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 [email protected]
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?

2
  • 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, 2019 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, 2019 at 16:44

2 Answers 2

1

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.

1
  • 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, 2019 at 16:50
1

Always access adminer using HTTPS protocol. Adminer devs disabled access with HTTP, but somehow forgot to put some message, like: 'Dude, use HTTPS!', ... instead of that opted for just quiet dying without given reason.

2
  • Welcome to the site, and thank you for your contribution. Perhaps you could add a link to the relevant part of the documentation (or the changelog) where the disabling of HTTP access is described?
    – AdminBee
    Jun 18, 2021 at 10:54
  • I do not have this. If memory serves, as I faced off with this problem awhile ago, there is nothing in change log and nothing in docs. One of these stealthy changes, that somehow never gotten to stage 2: write something in docs. Also from memory, It probably happened around the time they started requiring actual password - before you could have used empty string - e.g. on dev systems on your localhost. That is all I have.
    – Jeffz
    Jun 18, 2021 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .