Phpmyadmin forbidden

NethServer Version: 7.6
Module: phpmyadmin

Hi,
I’ve installed phpmyadmin from @stephdl repository but I can’t open the site.

Forbidden

You don't have permission to access /phpmyadmin on this server.

I restarted httpd service, but same error.
I think I have to change the rights of the site to apache:apache, but I can’t find it at the server.
Can somebody give me some tips?
Thanks in advance

check exact error in /var/log/httpd/*error
check also the ssl error in that directory

tips…are you on your lan, by default you are prohibited to access from external

Yes I’m on my LAN, it’s an internal webserver.

The error as ssl_error_log:

[Wed Jan 16 11:19:18.558405 2019] [ssl:warn] [pid 3427] AH01909: RSA certificate configured for localhost.localdomain:443 does NOT include an ID which matches the server name
[Wed Jan 16 11:19:18.559040 2019] [ssl:warn] [pid 3427] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)

and for error_log

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed Jan 16 10:10:29.465304 2019] [auth_digest:notice] [pid 4047] AH01757: generating secret for digest authentication ...
[Wed Jan 16 10:10:29.466336 2019] [lbmethod_heartbeat:notice] [pid 4047] AH02282: No slotmem from mod_heartmonitor
[Wed Jan 16 10:10:29.468599 2019] [ssl:warn] [pid 4047] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Wed Jan 16 10:10:29.490529 2019] [mpm_prefork:notice] [pid 4047] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16 configured -- resuming normal operations
[Wed Jan 16 10:10:29.490566 2019] [core:notice] [pid 4047] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Jan 16 10:11:09.943085 2019] [mpm_prefork:notice] [pid 4047] AH00171: Graceful restart requested, doing restart

Both logs have the date of today, but only entries from 16th January.

config show phpmyadmin

phpmyadmin=configuration
MemoryLimit=500M
PostMaxSize=100M
UploadMaxSize=100M
access=private
adminaccess=disabled
status=enabled

quick test in a vm OK, really no trick. Did you succeed to this page ?

check also the access log, sorry

No, only the text as I mentioned above

192.168.46.130 - - [30/Jan/2019:08:53:49 +0100] "GET / HTTP/1.1" 403 4117 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
192.168.46.130 - - [30/Jan/2019:08:53:54 +0100] "GET /noindex/css/bootstrap.min.css HTTP/1.1" 200 19341 "http://192.168.46.160/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.$
192.168.46.130 - - [30/Jan/2019:08:53:54 +0100] "GET /noindex/css/open-sans.css HTTP/1.1" 200 5081 "http://192.168.46.160/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
192.168.46.130 - - [30/Jan/2019:08:53:54 +0100] "GET /images/poweredby.png HTTP/1.1" 200 3956 "http://192.168.46.160/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
192.168.46.130 - - [30/Jan/2019:08:53:54 +0100] "GET /images/nethserver.png HTTP/1.1" 200 18190 "http://192.168.46.160/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
192.168.46.130 - - [30/Jan/2019:08:53:54 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
192.168.46.130 - - [30/Jan/2019:08:53:54 +0100] "GET /noindex/css/fonts/Light/OpenSans-Light.woff HTTP/1.1" 200 62844 "http://192.168.46.160/noindex/css/open-sans.css" "Mozilla/5.0 (Windows NT 6.1; WOW$
192.168.46.130 - - [30/Jan/2019:08:53:54 +0100] "GET /noindex/css/fonts/Bold/OpenSans-Bold.woff HTTP/1.1" 200 63564 "http://192.168.46.160/noindex/css/open-sans.css" "Mozilla/5.0 (Windows NT 6.1; WOW64$
192.168.46.130 - - [30/Jan/2019:11:03:42 +0100] "GET /jonas-farbenwerke.de HTTP/1.1" 404 218 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
192.168.46.130 - - [30/Jan/2019:11:03:42 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
192.168.46.130 - - [30/Jan/2019:11:03:49 +0100] "GET / HTTP/1.1" 403 4117 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"

The domain works, I tried with an index.html (Hello World), but not phpmyadmin.

something wrong on your side, you should look all you apache vhost, you probably did something bad

what is the output of

httpd -S

2 Likes

It’s not working through the vhost because there’s only the index.html, no phpmyadmin. Try to browse to IP instead, that should work.

1 Like

Sorry for delay.

Yes, you are right Markus. Thanks for your help.

Thanks for your help too. I think everything is OK now, but here is still the output of

httpd -S

VirtualHost configuration:
*:443                  is a NameVirtualHost
         default server webserver.jonasintern.de (/etc/httpd/conf.d/nethserver.conf:44)
         port 443 namevhost webserver.jonasintern.de (/etc/httpd/conf.d/nethserver.conf:44)
         port 443 namevhost webserver.jonasintern.de (/etc/httpd/conf.d/ssl.conf:56)
         port 443 namevhost jonas-farbenwerke.de (/etc/httpd/conf.d/virtualhosts.conf:24)
*:80                   is a NameVirtualHost
         default server webserver.jonasintern.de (/etc/httpd/conf.d/virtualhosts.conf:12)
         port 80 namevhost webserver.jonasintern.de (/etc/httpd/conf.d/virtualhosts.conf:12)
         port 80 namevhost jonas-farbenwerke.de (/etc/httpd/conf.d/virtualhosts.conf:67)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/run/httpd/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
PidFile: "/run/httpd/httpd.pid"
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

Do you have a virtualhost created ‘jonas-farbenwerke.de’ that corresponds to the first domain name of the server?

No, FQDN of the server is ‘webserver.jonasintern.de’ and the vhost is 'jonas-farbenwerke.de"

What was the url you used…afaik you set the post resolved with the markus tips to use the IP.

1 Like

I used the url of the vhost ‘jonas-farbenwerke.de

1 Like

Ok i can see a website configured with that vhost… It makes sense

No, the site you see is at a server of a provider.
My job is to copy this website you see to an internal webserver for presentation without internet connection.

Thanks again Michael

PS: Is it possible to automatically do a link in every vhost directory to reach phpmyadmin with all vhost addresses?

It should be already the case… Let me try this afternoon or behind a beers at fosdem :slight_smile:

1 Like

Your first beer will be mine :beer:

@stephdl, you don’t have to search for it, I looked at error_log again and today I found entries from yesterday, which said, phpmyadmin is only reachable with ssl.
With

Führender Hersteller von Eigenmarken für Innen- und Außenfarben - Jonas Farben

it works.

1 Like

the redirection should work … hum