These are chat archives for codersArmy/codersArmy.github.io
tail -f /var/log/apache2/error.logbefore you access the site. On Fedora, that should be
tail -f /var/log/httpd/error_log.
I was able to reproduce this error message exactly by creating a subdirectory of my document root with permissions that don't allow access to the directory:
drwx------ 2 root root 4096 Feb 23 15:52 testdir
I left it there, so you can see the message at http://www.ghodmode.com/testdir
While watching the error log, the message was this:
[Tue Feb 23 15:52:38.197190 2016] [core:crit] [pid 21535] (13)Permission denied: [client 220.127.116.11:31884] AH00529: /var/www/html/testdir/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testdir/' is executable
In this case, I know that the directory permissions are preventing access. Your problem could be the same, or it could be permissions on index.php in your phpmyadmin folder. The message in the error log should answer that for you.
www-data) and make sure that user can read the files.
tail -fit in a console and try to load your page. Unless you have high traffic already, the first message that comes up should tell you your error.
If nothing pops up in the error log at exactly the same moment as you try to access the site, then tail access_log instead just to make sure it's logging.
If you're accessing your site through a proxy or something like Cloudflare, it might be caching requests.
You have to access your site directly in order to monitor logs.
<Directoryentry for /usr/share/phpMyAdmin. Make sure it has the following line in it:
# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so 'log/access_log' # with ServerRoot set to '/www' will be interpreted by the # server as '/www/log/access_log', where as '/log/access_log' will be # interpreted as '/log/access_log'. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to specify a local disk on the # Mutex directive, if file-based mutexes are used. If you wish to share the # same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "/etc/httpd" # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 18.104.22.168:80 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # Include conf.modules.d/*.conf # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User apache Group apache # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # <VirtualHost> definition. These values also provide defaults for # any <VirtualHost> containers you may define later in the file. # # All of these directives may appear inside <VirtualHost> containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. firstname.lastname@example.org # ServerAdmin root@localhost # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # #ServerName www.example.com:80 # # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # <Directory> blocks below. # <Directory /> AllowOverride none Require all denied </Directory> # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # DocumentRoot: The directory out
Include conf.modules.d/*.conf? It's in one of the files in the subdirectory conf.modules.d. The name of the file is probably phpmyadmin.conf.
Options FollowSymlinksturned on in your
AllowOverride nonein the main file to
AllowOverride all. Hold on, let me look that up. This setting controls whether or not it uses
AllowOverride... it doesn't look like phpMyAdmin uses
.htaccess. That might be something you should consider later to secure phpMyAdmin, though... and me too :P
<Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 Options FollowSymLinks <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny>
<IfModulepart. That part may be specific to my configuration.
Alias /phpmyadmin /usr/share/phpMyAdminand restarted your web server?
<IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require ip 127.0.0.1 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 </IfModule> </Directory> <Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require ip 127.0.0.1 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 </IfModule> </Directory>