By ilahameed
After I reboot server .htaccess stop working, when I try to access any URL defined in my .htaccess it says “404 Not Found <br> nginx”
even mydomian.com/phpmyadmin displays the same error. “404 Not Found <br> nginx”
May be its something with nginx , not sure about it.
Any help is highly appreciated.
Thank you!
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!
Hi!
Since .htaccess worked before, it sounds like you’ve been using Apache but also have nginx installed which is apparently starting before Apache and reserving port 80 to it.
First of all, stop nginx and start Apache:
sudo systemctl stop nginx.service
sudo systemctl start apache2.service
Or, if you’re running an older version of Ubuntu/Debian:
sudo service nginx stop
sudo service apache2 start
Your website should now work fine. Make sure that that is the case, and then disable nginx from starting on boot:
sudo systemctl disable nginx.service
Again, if you’re running an older version of Ubuntu/Debian:
sudo update-rc.d nginx disable
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.