Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Running Ubuntu 13.10 in VirtualBox.

I've put my website in this folder: http://i.stack.imgur.com/YYhcJ.jpg

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:


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;


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:       localhost       lalle-VM
 217.72.x.x streamsy.com


sudo service nginx restart

* Restarting nginx nginx                                                [ OK ]

Result, localhost work too: http://i.stack.imgur.com/e78Vv.jpg

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.

share|improve this question

closed as off-topic by Michael Hampton Feb 28 '14 at 17:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

You need to edit your /etc/hosts file as follows. localhost streamsy.com

but this way you won't get reach real streamsy.com because it's hosted on (unless this is your ip address)

share|improve this answer
Nope that's not my ip, streamsy.com is just a label I have, I could have used example.com or so instead. How can I access my site remotely? I wish to type my real ip (217.72.x.x) into the address bar and load the website. My router have forwarded ports 80 –  user2010496 Feb 27 '14 at 17:20
Your remote computer has to solve your domain/label as your server's public IP address. and of course you have to use NAT if your server is behind any router. –  risyasin Feb 28 '14 at 19:10
up vote -1 down vote accepted

Solved by opening port 80 in router.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.