By katovonkatz
As I was following this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-18-04, I came a long way. But then after step 5, Wordpress doesn’t start on my website.
The website keeps displaying the html message that I programmed at step 4 of this tutorial https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-20-04, which I installed in this file: /var/www/your_domain/index.html
I have to say that the OS I am using is Ubuntu 20.04 (spec Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-45-generic x86_64)), but I don’t think that the problem is there.
My best guess is that the problem must have something to do with a redirection. Can anyone help me out here? There are also similar questions below the tutorial, but the answers proposed are not working for me.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hi there @KatoVonKatz,
There are a couple of things which could be causing this problem.
/var/www/html/
, you would need to remove the index.html
file from there, you can do that with the following command:- rm /var/www/html/index.html
This needs to be done as WordPress uses an index.php
file and that index.html
is not part of the WordPress core files anyway.
- sudo chown -R www-data:www-data /var/www/wordpress
Change the /var/www/wordpress
part if this is not the directory where you installed WordPress at.
- sudo tail -100 /var/log/nginx/error.log
Let me know how it goes! Regards, Bobby
@bobbyiliev , I will start a new threat here, because I can’t reply to you anymore via the above.
Yes, I did get an error report when I requested the nginx error log, but I can’t replicate that anymore.
But… now that I have the website up and running, as soon as I activate the code below, my website is down with an HTTP ERROR 500 message.
define('FS_METHOD', 'direct');
As soon as I remove the command, the website is active again. So, this really is the problem. I will share with you my error log. Maybe this has something to do with the transition from Ubuntu 18.04 to Ubuntu 20.04?
sudo tail -100 /var/log/nginx/error.log
2020/10/27 00:17:45 [error] 88235#88235: *2262 directory index of "/var/www/html/" is forbidden, client: 61.58.80.242, server: _, request: "GET / HTTP/1.1", host: "127.0.0.1"
2020/10/27 00:30:59 [error] 88235#88235: *2263 directory index of "/var/www/html/" is forbidden, client: 176.173.255.186, server: _, request: "GET / HTTP/1.1", host: "134.122.61.246"
2020/10/27 01:17:53 [error] 88235#88235: *2284 directory index of "/var/www/html/" is forbidden, client: 203.76.115.83, server: _, request: "GET / HTTP/1.1", host: "127.0.0.1"
2020/10/27 03:34:30 [error] 88235#88235: *2325 directory index of "/var/www/html/" is forbidden, client: 178.128.194.144, server: _, request: "GET / HTTP/1.1", host: "134.122.61.246"
2020/10/27 03:35:49 [error] 88235#88235: *2327 directory index of "/var/www/html/" is forbidden, client: 162.243.128.230, server: _, request: "GET / HTTP/1.1", host: "134.122.61.246"
2020/10/27 05:44:42 [error] 88235#88235: *2377 directory index of "/var/www/html/" is forbidden, client: 209.194.163.115, server: _, request: "GET / HTTP/1.1", host: "127.0.0.1"
2020/10/27 05:55:08 [error] 88235#88235: *2382 directory index of "/var/www/html/" is forbidden, client: 192.35.168.96, server: _, request: "GET / HTTP/1.1", host: "134.122.61.246"
2020/10/27 07:47:45 [error] 88235#88235: *2419 directory index of "/var/www/html/" is forbidden, client: 193.27.229.26, server: _, request: "GET /?XDEBUG_SESSION_START=phpstorm HTTP/1.1", host: "134.122.61.246:80"
2020/10/27 07:50:22 [error] 88235#88235: *2424 directory index of "/var/www/html/" is forbidden, client: 220.132.207.155, server: _, request: "GET / HTTP/1.1", host: "127.0.0.1"
2020/10/27 07:59:31 [error] 88235#88235: *2426 directory index of "/var/www/html/" is forbidden, client: 193.27.229.26, server: _, request: "GET /?a=fetch&content=<php>die(@md5(HelloThinkCMF))</php> HTTP/1.1", host: "134.122.61.246:80"
2020/10/27 08:28:36 [notice] 94444#94444: signal process started
2020/10/27 08:28:43 [error] 94445#94445: *2447 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected 'define' (T_STRING) in /var/www/donutnetwerk.nl/wp-config.php on line 52" while reading response header from upstream, client: 91.141.140.37, server: donutnetwerk.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "donutnetwerk.nl"
2020/10/27 08:28:49 [error] 94445#94445: *2448 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected 'define' (T_STRING) in /var/www/donutnetwerk.nl/wp-config.php on line 52" while reading response header from upstream, client: 91.141.140.37, server: donutnetwerk.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "donutnetwerk.nl"
2020/10/27 08:28:55 [error] 94445#94445: *2452 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected 'define' (T_STRING) in /var/www/donutnetwerk.nl/wp-config.php on line 52" while reading response header from upstream, client: 91.141.140.37, server: donutnetwerk.nl, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "donutnetwerk.nl
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.