0

By trying to get adminer running under archlinux, I got into this problem.

When setting up apache for adminer and calling localhost/adminer either with firefox or opera, I receive code 403 (access forbidden). When starting adminer without apache via:

php -S localhost:8000 -t /usr/share/webapps/adminer/

calling localhost/adminer with firefox works. All folders in the path to the index.php file have read and execute permissions. There is only one single file with read permission "index.php" present. The same accounts for my ServerRoot "/srv/http/" except that there is not a single file in there.

There must be a mistake in my apache config files.

The relevant parts of my apache config files are:

/etc/httpd/conf/httpd.conf:

ServerRoot "/etc/httpd"
Listen 80
...
User http
Group http
ServerAdmin you@example.com
ServerName localhost:80
<Directory />
    AllowOverride none
    Require all denied
</Directory>
DocumentRoot "/srv/http"
<Directory "/srv/http">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
...
Include conf/extra/httpd-adminer.conf
...

/etc/httpd/conf/extra/httpd-adminer.conf:

# vim: ft=apache

Alias /adminer "/usr/share/webapps/adminer"
<Directory "/usr/share/webapps/adminer">
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

I tryed to use a symlink without the Alias-line in "http-adminer.conf" without success. Yes, I made sure to restart the apache sever. (And the server is running, otherwise the code would 404 and not 403.)

What am I doing wrong?

  • Do you have a server on localhost:8000? You can use reverse proxy for this service via apache. (serverfault.com/questions/948824/…) is a reverse proxy example for you. – jefferyear Jan 15 at 1:41
  • @jefferyear : Thanks for your reply. I have no running server except apache on port 420, when starting my system. I only want to use the adminer php-script to work with an sql database (for which I will start a server at port 4253 later). I think, implemeting a reverse proxy would be to complicated for my simple undertaking. – bejo Jan 15 at 16:44
0

If you are just serving adminer from that web server, change the root that Apache serves pages from as in:

DocumentRoot "/usr/share/webapps/adminer"

And then restart the Apache service.

  • When I change to: DocumentRoot "/usr/share/webapps/adminer", I receive the code 403, when accessing "localhost/adminer" or "localhost" alone (without adminer) in a browser. I also changed the Directory statement to "/usr/share/webapps/adminer" with the same result. – bejo Jan 15 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.