ZachyBear
ZachyBear

Reputation: 307

Nginx config root path

I am trying to launch a server and my nginx is testing out okay but I still get the "Welcome to nginx" page when loading it up in the web browser. my path to my applications public folder is here:

home/dev/application/public/

and my nginx config looks like this:

server {
        listen       80;
        server_name  xxxx.com;
        passenger_enabled on;
        root /home/dev/application/public;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   home/dev/application/public;
            index  index.html index.htm;
        }

I followed the examples as best as I could but it is not loading up my application. I am sure I am doing my root wrong and I thank anyone who knows what the deal is here.

Upvotes: 1

Views: 2509

Answers (1)

dpaluy
dpaluy

Reputation: 3715

Do the following: cd /etc/nginx/sites-enabled/ ls -l

It should contain your config file (Best practise to make a soft link to /etc/nginx/sites-available/your.conf) If sites-enabled contains default, remove it: rm default

After removing, default file and verifying your correct conf file exists, restart the server:

service nginx restart

Creating a Soft Link

ln -s /etc/nginx/sites-available/your_nginx.conf /etc/nginx/sites-enabled/your_server_name

Upvotes: 2

Related Questions