Running Ubuntu 13.10 in VirtualBox.
I've put my website in this folder:
And created the log folder on /srv/www/streamsy.com/logs/.
I've done these steps:
sudo apt-get install nginx
sudo chown -R www-data:www-data /srv/www/streamsy.com/public_html
sudo chmod 755 /srv/www
The config files looks like this:
/etc/nginx/sites-available/streamsy.com:
server {
listen 80;
server_name streamsy.com;
access_log /srv/www/streamsy.com/logs/access.log;
error_log /srv/www/streamsy.com/logs/error.log;
location / {
root /srv/www/streamsy.com/public_html/;
index index.html;
}
}
/etc/nginx/nginx.conf:
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/streamsy.com;
}
I've enabled the streamsy.com file with:
sudo ln -s /etc/nginx/sites-available/streamsy.com /etc/nginx/sites-enabled/streamsy.com
Editted /etc/hosts, but with real ip instead of x:
127.0.0.1 localhost
127.0.1.1 lalle-VM
217.72.x.x streamsy.com
Restarting:
sudo service nginx restart
* Restarting nginx nginx [ OK ]
No errors in /var/log/nginx/error.log
Anybody have any ideas what I'm doing wrong? I want to be able to access my nginx server remotely on my public IP. Thanks.