By sachinkarki
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!
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.
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.