Report this

What is the reason for this report?

After I reboot server .htaccess stop working. "404 Not Found <br> nginx"

Posted on March 3, 2015

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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.