nginx.conf questions

Aditya Herlambang aditya15417 at hotmail.com
Mon Feb 28 07:51:21 MSK 2011


I was following the tutorial here. It says
This will create the virtual host file for Nginx in the sites-available directory. Simply paste the following into the file and change each instance of “example.com” to your site’s domain name:
server {
     listen   80;
     server_name  www.example.com;
     rewrite ^/(.*) http://example.com/$1 permanent;
     }

server {
     listen   80;
     server_name example.com;

     access_log /var/www/example.com/logs/access.log;
     error_log /var/www/example.com/logs/error.log;

     location / {
          root   /var/www/example.com/public/;
          index  index.html;
          }
}
The problem is that I don't have a domain name, I have an ip address... so what should I change example.com to? I tried changing it to my ip address, but it doesn't work

However, I don't have a domain name... I have an IP... what if I want to make this as a subdomain, say xxx.xxx.xxx.xxx/exampleHow can I do that? 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110228/858ab354/attachment.html>


More information about the nginx mailing list