• Resolved mfioretti

    (@mfioretti)


    Hello,

    I need to install wordpress 5.2.2 on a Centos 7.6 VPS with apache 2.4 , with its own domain “https://example.com”

    First, I read that for that wordpress version php 7.3 is “recommended”, but the server is currently running php 7.2, because other software already running there needs that version. Is that a show stopper? Or will it only cause e.g. slower performance? Anyway, the REAL problem is that I cannot even start the famous “5 minutes install”. I have created the MariaDB database and downloaded and unpacked the wp files. I also created a new letsencrypt certificate for “example.com”.

    Finally, I configured apache as below… and now I am stuck, because when I point the browser at https://example.com/wp-admin/install.php all I get is:

    “You don’t have permission to access /wp-admin/install.php on this server” in the browser

    and, in the apache error log:

    “AH01630: client denied by server configuration: /var/www/html/wordpress/example/wp-admin/install.php”

    that file and folder ARE readable by apache, the redirection and certificate work fine (I get the green lock icon in the browser).

    I have installed wordpress many times in the past, but not in the last 1/2 years, so I understand that there must be something obvious I forgot or am missing, either in a .htaccess file (there is none right now) and/or in the httpd.conf section below. Fact is, I have already searched any combination of the errors above, and cannot find any specific configuration tip (none that works, anyway). Any help to pass this block is VERY appreciated!

    TIA,
    Marco

    <VirtualHost example.com:80>
    ServerName example.com
    Redirect permanent / https://example.com/
    </VirtualHost>

    <VirtualHost example.com:443>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/wordpress/example
    ServerName example.com

    SSLEngine on
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem

    AccessFileName .htaccess
    CustomLog logs/example.com.access.log combined
    ErrorLog logs/example.com.error.log

    </VirtualHost>

Viewing 10 replies - 1 through 10 (of 10 total)
  • Are your permissions set to 755?
    Also is the path correct to your file? Maybe you have a different path set or misconfigured?
    Also try these if permissions and paths are correct: https://www.digitalocean.com/community/questions/forbidden-you-don-t-have-permission-to-access-wp-admin-install-php-on-this-server

    Thread Starter mfioretti

    (@mfioretti)

    The path is correct. I know this because I see it in the server error log:

    AH01630: client denied by server configuration: /var/www/html/wordpress/example/wp-admin/install.php

    that is, /var/www/html/wordpress/example/wp-admin/install.php IS the correct absolute unix path to that file

    Also, I have run these commands (on centos, “apache” is the httpd user) from the wordpress root folder and restarted the server, but nothing changes:

    chown -R apache:apache .
    find . -type f -print0|xargs -0 chmod 644
    find . -type d -print0|xargs -0 chmod 755

    also, in case it matters, selinux is set to permissive.

    Dion

    (@diondesigns)

    Add the following to your Apache configuration, just above the virtualhost section. Then reboot Apache and see if things are working properly.

    <Directory "/var/www/html/wordpress">
    	Require all granted
    </Directory>

    And FWIW, PHP 7.2 is fine. In fact it’s probably better than PHP 7.3 at the moment since 7.3 still has some issues with PCRE2 that need to be ironed out.

    Thread Starter mfioretti

    (@mfioretti)

    Add the following to your Apache configuration, just above the virtualhost section. Then reboot Apache and see if things are working properly.

    <Directory “/var/www/html/wordpress”>
    Require all granted
    </Directory>

    YES, this let me load the wp-admin/install.php, which in turn loads wp-admin/setup-config.php . THANKS. Seems ok. Right now I cannot proceed with the installation, but tomorrow will do it, and mark this as resolved if there are no other problems. Thanks again!

    Thread Starter mfioretti

    (@mfioretti)

    I confirm this solution works, because I have found what the problem was: the httpd package I have installed on CentOS does NOT have /var/www/html as DocumentRoot. So the settings suggested by @diondesigns WERE present, but applied to the wrong folder!

    Does your step by step installation correct? Or, do you have been check it the Apache setting up? In some case, there are any various cause so you getting the error. One of the problem maybe from you database connection and wp-config.

    In Ubuntu everything from the web site down needs to be

    sudo chown -R www-data:www-data ./public_html
    sudo chmod -R 755 ./public_html

    I always create a public_html directory as the base.

    Hello,

    I hope you are well, I have a quite similar problem and well, it is the first time I try to set up a website, so as you can guess I’m quite lost, I have installed and uninstalled wordpress, without success, now I read this solution, However, I don’t know what would be the path to follow to configure Apache, the only place I see Apache is on the panel of my server, but I don’t think it’s there, if you help me I will be eternally grateful.

    Thread Starter mfioretti

    (@mfioretti)

    Hello @kerry7 ,

    if “the only place you see Apache is on the panel of my server” it means you are using a hosting service, with such a configuration that the only way to solve your problem is to ask the support staff of that provider, not here. Sorry I cannot help more.

    Hello @mfioretti ,

    Well, it’s a vps with vesta,i will try ask to vps provider, but thanks for responding.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘cannot install: “You don’t have permission to access /wp-admin/install.php..”’ is closed to new replies.