I recently bought a DigitalOcean account, and am attempting to set up my web site. However, whenever I enter the IP address of my site, I get this page:
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org. Commercial support is available at nginx.com.
Thank you for using nginx.
I have searched for answers, but have not found anything that works for me. I am running Ubuntu LEMP on 14.04, and used the one-click installation. I am planning to put my pages/files into the "usr/share/nginx/html" folder, which I have declared as the root.
Here is the "etc/nginx/available-sites/default.conf" file to hopefully accomodate this:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost unaviamedia.ca;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
.........
}
However, I am still only getting the Nginx welcome page when I access my site by IP, and it is getting annoying. How can I show the home page?
Edit: Updated code to match my latest attempt. Also, for those who are wondering, I have restarted nginx several times.
Let me know if I need to add anything else. Thanks!