Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webserver with nginx working until .save file created

Tags:

nginx

ubuntu

After googling everywhere the last 48 hours to find out why my server suddenly stopped working, and finally, finding the answer myself, I decided to post it up here for anyone else who is googling a whole weekend away on something so trivial.

Loaded everything on nginx, LEMP working perfectly, but then I tried to do some SSL modifications and in the middle of everything it stopped working.

I've completely removed everything but the necessary lines in sites-available/www (my version of sites-available/default) and checked that nginx.conf is correctly formatted without double includes that I've seen mentioned in other places.

It appears the a file sneaked into my configurations and messed everything up. It's an autosave file called nginx.conf.save which gets in the way of the original nginx.conf configuration and causes a Page not found error.

Now back to getting PHP working with SSL... happy times!

like image 792
Leon M Avatar asked Oct 06 '14 04:10

Leon M


People also ask

Does nginx serve static files?

Configure NGINX and NGINX Plus to serve static content, with type-specific root directories, checks for file existence, and performance optimizations.

How do I use nginx as a file server?

Serving static files using nginx as web server is a good option. For making the static files available you need to copy your testfolder to /usr/share/nginx/html inside the nginx image. After which you will be able to see the files on your browser on port 8080.

Where are nginx web files stored?

Every NGINX configuration file will be found in the /etc/nginx/ directory, with the main configuration file located in /etc/nginx/nginx. conf .


1 Answers

Removed the file nginx.conf.save and reloaded nginx. Now it loads my webpages as it should.

like image 140
Leon M Avatar answered Oct 03 '22 04:10

Leon M