I hope someone can help me here. I just want to change the index.html to index.php, but when I do so I get the 403 forbidden error. I followed a bunch of tutorials on permission and installing php etc. to no avail. I am a complete newbie, so most of the time I don’t really know what I am doing but I am trying to follow the tutorials.
If someone could give me complete newbie intructions on how to solve this, I’d be very grateful. I learned how to access files and other simple stuff but not much more.
I am using nginx on ubuntu. With the html files my website works fine, but I need it .php to run something.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
Hi @karpred , I had to start new answer again :D Thanks for the latest result, and please provide one couple more. So, it will be two files: get_me_and_remove_me_2 and get_me_and_remove_me_3
It seems like you might not have PHP installed.
Please follow the last reply from @Yannek, they provided you with steps on how to install PHP on your droplet. See if that works.
You need to check 2 or 3 things In your domain’s Nginx configuration file.
The first is your
rootor referred to as DocumentRoot directive. In your case it’s
/var/www/htmlbut are you sure that’s where your files are located? Enter that directory and see if the files are there or located in another folder named after your domain. If it’s the second option just add the domain in your root directive :
That’s only if the files are in the said folder.
The next thing to change would be the
You should change it to include your domain
After you make those changes, restart nginx and see if your website works properly now.