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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
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
1.
For sudoer:
For root:
2.
For sudoer:
For root:
Hi @karpred,
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.
Hello @karpred,
You need to check 2 or 3 things In your domain’s Nginx configuration file.
The first is your
root
or referred to as DocumentRoot directive. In your case it’s/var/www/html
but 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 :to be
That’s only if the files are in the said folder.
The next thing to change would be the
server_name
You should change it to include your domain
After you make those changes, restart nginx and see if your website works properly now.
Regards, KFSys