Report this

What is the reason for this report?

My website is throwing 404 erorr. Please Help me ?

Posted on June 15, 2015

Hi I have one script. It is codeignitor based script and it is working well in my localhost. After uploading it to droplet my website is throwing 404 error.I checked all files and folders and they are there not a single one missing.What might be the problem even my database is working properly.



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.

Without knowing what web server you are running, what operating system it is running on, what your web root is set to, where you uploaded the files or which user you used when uploading It is next to impossible to troubleshoot this issue.

That being said, here are a few tips:

1.) Check your web server’s error log. This will be in a subdirectory in /var/log. The directory will vary depending on the OS and web server you’re using. The log of the 404 error should show the requested URL.

2.) Check your web server configuration. This will be a subdirectory of /etc/ (on Ubuntu/Debian it will be apache2 or nginx, on CentOS/Fedora it will be httpd or nginx). In the sites-enabled subdirectory view the configuration file you see to find the web root. This will be specified as root or DocumentRoot. The document root is what is shown for yourdomain.com/ in a browser and all URLS start from that level when you’re accessing your site.

3.) Check that the files you wish to access are located in the location noted in the error log, under the document root directory.

4.) Check that those files are owned by (or readable by) the user your web service is running under. This may be www-data, httpd, nobody, or something else depending on the software you are running.

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.