2011年2月27日星期日

nginx.conf questions

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/example
How can I do that?

没有评论:

发表评论