# Virtual host in one ip address

**URL:** <https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058>\
**Category:** NGINX\
**Created:** [March 4, 2011, 5:24am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058 "2011-03-04T05:24:01Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 4, 2011, 5:24am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/1 "2011-03-04T05:24:01Z")

</div>

I have a rackspace server running with nginx. I am a newbie to all the  
server stuff. Let me explain the situation here:I have an IP address and  
I have two virtual host on my machine.I don’t have a domain and I don’t  
want to buy oneI want to map it so I can access the website as  
xxx.xxx.xxx.xxx/v\_host1 and xxx.xxx.xxx.xxx/v\_host2How can I do this the  
easy way? I am guessing I should change the nginx config of my site…  
but not sure which one to change.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 7:03am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/2 "2011-03-04T07:03:27Z")

</div>

On Mar 4, 2011, at 7:22 , Alex H wrote:

> I have a rackspace server running with nginx. I am a newbie to all the server  
> stuff. Let me explain the situation here:
> 
> I have an IP address and I have two virtual host on my machine.  
> I don’t have a domain and I don’t want to buy one  
> I want to map it so I can access the website as xxx.xxx.xxx.xxx/v\_host1 and  
> xxx.xxx.xxx.xxx/v\_host2  
> How can I do this the easy way? I am guessing I should change the nginx config  
> of my site… but not sure which one to change.

server {  
location /v\_host1/ {  
root /path/to/v\_host1;  
}  
location /v\_host2/ {  
root /path/to/v\_host2;  
}

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 7:12am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/3 "2011-03-04T07:12:13Z")

</div>

Is this on the default of the nginx.conf?

From: removed\_email\_address@domain.invalid  
Date: Fri, 4 Mar 2011 09:01:33 +0300  
To: removed\_email\_address@domain.invalid  
Subject: Re: virtual host in one ip address

On Mar 4, 2011, at 7:22 , Alex H wrote:I have a rackspace server running  
with nginx. I am a newbie to all the server stuff. Let me explain the  
situation here:I have an IP address and I have two virtual host on my  
machine.I don’t have a domain and I don’t want to buy oneI want to map  
it so I can access the website as xxx.xxx.xxx.xxx/v\_host1 and  
xxx.xxx.xxx.xxx/v\_host2How can I do this the easy way? I am guessing I  
should change the nginx config of my site… but not sure which one to  
change.server { location /v\_host1/ { root /path/to/v\_host1;  
} location /v\_host2/ { root /path/to/v\_host2; }

–  
Igor S.  
[http://sysoev.ru/en/](http://sysoev.ru/en/)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 7:16am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/4 "2011-03-04T07:16:37Z")

</div>

On Mar 4, 2011, at 9:10 , Alex H wrote:

> Is this on the default of the nginx.conf?

I do not know what do you mean by default. The whole configuration is  
like

http {  
server {  
location /v\_host1/ {  
}  
location /v\_host1/ {  
}  
}  
}

That’s all.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 7:22am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/5 "2011-03-04T07:22:14Z")

</div>

What does "nginx -V " show ?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 7:33am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/6 "2011-03-04T07:33:29Z")

</div>

configure arguments: --conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid  
–lock-path=/var/lock/nginx.lock  
–http-log-path=/var/log/nginx/access.log  
–http-client-body-temp-path=/var/lib/nginx/body  
–http-proxy-temp-path=/var/lib/nginx/proxy  
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug  
–with-http\_stub\_status\_module --with-http\_flv\_module  
–with-http\_ssl\_module --with-http\_dav\_module  
–with-http\_gzip\_static\_module --with-http\_realip\_module --with-mail  
–with-mail\_ssl\_module --with-ipv6  
–add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:21:10 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

What does "nginx -V " show ?

On Mar 4, 2011, at 9:17 , Alex H wrote:Where is this config file that I  
need to edit?

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:15:26 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

On Mar 4, 2011, at 9:10 , Alex H wrote:Is this on the default of the  
nginx.conf?

I do not know what do you mean by default. The whole configuration is  
like  
http { server { location /v\_host1/ { } location  
/v\_host1/ { } }}  
That’s all.  
From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:01:33 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

## On Mar 4, 2011, at 7:22 , Alex H wrote:I have a rackspace server running with nginx. I am a newbie to all the server stuff. Let me explain the situation here:I have an IP address and I have two virtual host on my machine.I don’t have a domain and I don’t want to buy oneI want to map it so I can access the website as xxx.xxx.xxx.xxx/v\_host1 and xxx.xxx.xxx.xxx/v\_host2How can I do this the easy way? I am guessing I should change the nginx config of my site… but not sure which one to change.server { location /v\_host1/ { root /path/to/v\_host1; } location /v\_host2/ { root /path/to/v\_host2; }

Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 7:19am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/7 "2011-03-04T07:19:07Z")

</div>

Where is this config file that I need to edit?

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:15:26 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

On Mar 4, 2011, at 9:10 , Alex H wrote:Is this on the default of the  
nginx.conf?

I do not know what do you mean by default. The whole configuration is  
like  
http { server { location /v\_host1/ { } location  
/v\_host1/ { } }}  
That’s all.  
From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:01:33 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

## On Mar 4, 2011, at 7:22 , Alex H wrote:I have a rackspace server running with nginx. I am a newbie to all the server stuff. Let me explain the situation here:I have an IP address and I have two virtual host on my machine.I don’t have a domain and I don’t want to buy oneI want to map it so I can access the website as xxx.xxx.xxx.xxx/v\_host1 and xxx.xxx.xxx.xxx/v\_host2How can I do this the easy way? I am guessing I should change the nginx config of my site… but not sure which one to change.server { location /v\_host1/ { root /path/to/v\_host1; } location /v\_host2/ { root /path/to/v\_host2; }

Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 7:35am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/8 "2011-03-04T07:35:58Z")

</div>

> -conf-path=/etc/nginx/nginx.conf

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 9:36am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/9 "2011-03-04T09:36:54Z")

</div>

Hello,

what does noit work exactly. As I can see there may be a fastcgi\_pass  
missing to handle php (ex /phpmyadmin) and maybe index documents need to  
be set.

Greets  
Pascal

Am 04.03.2011 08:06, schrieb Alex H:

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 8:07am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/10 "2011-03-04T08:07:52Z")

</div>

It just doesn’t work, here’s my .conf:  
user www-data;worker\_processes 4;  
error\_log /var/log/nginx/error.log;pid /var/run/nginx.pid;  
events { worker\_connections 1024; # multi\_accept on;}  
http { include /etc/nginx/mime.types;  
server { location /phpmyadmin/ { root  
/usr/share/phpmyadmin; }

```
    location /apiadmin/ { root 

```

/var/www/api/src/frapi/admin/public; } }  
access\_log /var/log/nginx/access.log;  
sendfile on; #tcp\_nopush on;  
#keepalive\_timeout 0; keepalive\_timeout 65; tcp\_nodelay  
on;  
gzip on; gzip\_disable "MSIE [1-6].(?!._SV1)";  
include /etc/nginx/conf.d/_.conf; include  
/etc/nginx/sites-enabled/\*;}

# mail {# # See sample authentication script at:#

[http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript##](http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript##) #  
auth\_http localhost/auth.php;# # pop3\_capabilities “TOP” “USER”;#

# imap\_capabilities “IMAP4rev1” “UIDPLUS”;## server {#

listen localhost:110;# protocol pop3;# proxy  
on;# }## server {# listen localhost:143;#  
protocol imap;# proxy on;# }# }

and just for an FYI, in my sites-enabled I have:  
server {  
listen 80; server\_name [php.example.com](http://php.example.com);  
access\_log /var/log/nginx/localhost.access.log;  
root /usr/share/phpmyadmin; index index.php;  
location / { try\_files $uri $uri/ @phpmyadmin; }  
location @phpmyadmin { fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_param SCRIPT\_FILENAME /usr/share/phpmyadmin/index.php;  
include /etc/nginx/fastcgi\_params; fastcgi\_param SCRIPT\_NAME  
/index.php; }  
# pass the PHP scripts to FastCGI server listening on  
127.0.0.1:9000 # location ~ .php$ { fastcgi\_pass  
127.0.0.1:9000; fastcgi\_index index.php; fastcgi\_param  
SCRIPT\_FILENAME /usr/share/phpmyadmin$fastcgi\_script\_nam  
e; include fastcgi\_params; }}

this is the virtual host that I want to be accessed via  
xxx.xxx.xxx.xxx/phpmyadmin

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:35:10 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

-conf-path=/etc/nginx/nginx.conf

On Mar 4, 2011, at 9:31 , Alex H wrote:configure arguments:  
–conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid  
–lock-path=/var/lock/nginx.lock  
–http-log-path=/var/log/nginx/access.log  
–http-client-body-temp-path=/var/lib/nginx/body  
–http-proxy-temp-path=/var/lib/nginx/proxy  
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug  
–with-http\_stub\_status\_module --with-http\_flv\_module  
–with-http\_ssl\_module --with-http\_dav\_module  
–with-http\_gzip\_static\_module --with-http\_realip\_module --with-mail  
–with-mail\_ssl\_module --with-ipv6  
–add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:21:10 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

What does "nginx -V " show ?

On Mar 4, 2011, at 9:17 , Alex H wrote:Where is this config file that I  
need to edit?

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:15:26 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

On Mar 4, 2011, at 9:10 , Alex H wrote:Is this on the default of the  
nginx.conf?

I do not know what do you mean by default. The whole configuration is  
like  
http { server { location /v\_host1/ { } location  
/v\_host1/ { } }}  
That’s all.  
From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Date: Fri, 4 Mar 2011 09:01:33 +0300  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

## On Mar 4, 2011, at 7:22 , Alex H wrote:I have a rackspace server running with nginx. I am a newbie to all the server stuff. Let me explain the situation here:I have an IP address and I have two virtual host on my machine.I don’t have a domain and I don’t want to buy oneI want to map it so I can access the website as xxx.xxx.xxx.xxx/v\_host1 and xxx.xxx.xxx.xxx/v\_host2How can I do this the easy way? I am guessing I should change the nginx config of my site… but not sure which one to change.server { location /v\_host1/ { root /path/to/v\_host1; } location /v\_host2/ { root /path/to/v\_host2; }

Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 2:41pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/11 "2011-03-04T14:41:22Z")

</div>

So I am confused as which one should I actually edit… there is a  
nginx.conf and there is a default in the sites-enabled folder…

Date: Fri, 4 Mar 2011 09:34:00 +0100  
From: removed\_email\_address@domain.invalid  
To: removed\_email\_address@domain.invalid  
Subject: Re: virtual host in one ip address

```
Hello,

what does noit work exactly. As I can see there may be a
fastcgi_pass missing to handle php (ex /phpmyadmin) and maybe index
documents need to be set.

Greets

Pascal

Am 04.03.2011 08:06, schrieb Alex H:

  It just
    doesn't work, here's my .conf:

    user
        www-data;
    worker_processes
         4;

    error_log
         /var/log/nginx/error.log;
    pid
             /var/run/nginx.pid;

    events
        {

         worker_connections 1024;
        #
        multi_accept on;
    }

    http
        {

         include /etc/nginx/mime.types;

         server {

           location /phpmyadmin/ {

                   root /usr/share/phpmyadmin;

           }

           location /apiadmin/ {

                   root /var/www/api/src/frapi/admin/public;

           }
        }

         access_log /var/log/nginx/access.log;

         sendfile on;

         #tcp_nopush on;

         #keepalive_timeout 0;

         keepalive_timeout 65;

         tcp_nodelay on;

         gzip on;

         gzip_disable "MSIE [1-6]\.(?!.*SV1)";

         include /etc/nginx/conf.d/*.conf;

         include /etc/nginx/sites-enabled/*;
    }

    #
        mail {
    #
        # See sample authentication script at:
    #
        #
        http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
    #
    #
        # auth_http localhost/auth.php;
    #
        # pop3_capabilities "TOP" "USER";
    #
        # imap_capabilities "IMAP4rev1" "UIDPLUS";
    #
    #
        server {
    #
            listen localhost:110;
    #
            protocol pop3;
    #
            proxy on;
    #
        }
    #
    #
        server {
    #
            listen localhost:143;
    #
            protocol imap;
    #
            proxy on;
    #
        }
    # }

    and just for an FYI, in my sites-enabled I have:

    server {

            listen 80;
            server_name php.example.com;

            access_log /var/log/nginx/localhost.access.log;

            root /usr/share/phpmyadmin;
            index index.php;

            location / {
            try_files $uri $uri/ @phpmyadmin;
            }

            location @phpmyadmin {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_param SCRIPT_FILENAME
      /usr/share/phpmyadmin/index.php;
            include /etc/nginx/fastcgi_params;
            fastcgi_param SCRIPT_NAME /index.php;
            }

            # pass the PHP scripts to FastCGI server listening
      on 127.0.0.1:9000
            #
            location ~ \.php$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME
       /usr/share/phpmyadmin$fastcgi_script_nam
                               e;
            include fastcgi_params;
            }
    }

    this is the virtual host that I want to be accessed via
      xxx.xxx.xxx.xxx/phpmyadmin

    From:
      removed_email_address@domain.invalid

    Date: Fri,
      4 Mar 2011 09:35:10 +0300

    To:
      removed_email_address@domain.invalid

    Subject:
      Re: virtual host in one ip address

            -conf-path=/etc/nginx/nginx.conf

      On Mar 4, 2011, at 9:31 , Alex H wrote:

            configure arguments:
              --conf-path=/etc/nginx/nginx.conf
              --error-log-path=/var/log/nginx/error.log
              --pid-path=/var/run/nginx.pid
              --lock-path=/var/lock/nginx.lock
              --http-log-path=/var/log/nginx/access.log
              --http-client-body-temp-path=/var/lib/nginx/body
              --http-proxy-temp-path=/var/lib/nginx/proxy
              --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
              --with-debug --with-http_stub_status_module
              --with-http_flv_module --with-http_ssl_module
              --with-http_dav_module --with-http_gzip_static_module
              --with-http_realip_module --with-mail
              --with-mail_ssl_module --with-ipv6
              --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

            From: removed_email_address@domain.invalid

            Date: Fri, 4 Mar 2011 09:21:10 +0300

            To: removed_email_address@domain.invalid

            Subject: Re: virtual host in one ip address

            What does "nginx -V " show ?

                On Mar 4, 2011, at 9:17 , Alex H wrote:

                    Where is this
                      config file that I need to edit?

                      From: removed_email_address@domain.invalid

                      Date: Fri, 4 Mar 2011 09:15:26 +0300

                      To: removed_email_address@domain.invalid

                      Subject: Re: virtual host in one ip address

                        On Mar 4, 2011, at 9:10 , Alex H wrote:

                            Is this on the default of the
                              nginx.conf?

                        I do not know what do you mean by
                          default. The whole configuration is like

                        http {
                            server {
                                location
                            /v_host1/ {
                                }
                                location
                            /v_host1/ {
                                }
                            }
                        }

                        That's all.

                            From: removed_email_address@domain.invalid

                              Date: Fri, 4 Mar 2011 09:01:33 +0300

                              To: removed_email_address@domain.invalid

                              Subject: Re: virtual host in one ip
                              address

                                On Mar 4, 2011, at 7:22 , Alex
                                  H wrote:

                                          I have a rackspace server
                                          running with nginx. I am a
                                          newbie to all the server
                                          stuff. Let me explain the
                                          situation here:

                                          I have an
                                            IP address and I have
                                            two virtual host on my
                                            machine.
                                          I don't
                                            have a domain and I
                                            don't want to buy one
                                          I want to
                                            map it so I can access
                                            the website as
                                            xxx.xxx.xxx.xxx/v_host1
                                            and
                                            xxx.xxx.xxx.xxx/v_host2

                                        How
                                          can I do this the easy
                                          way? I am guessing I
                                          should change the nginx
                                          config of my site... but
                                          not sure which one to
                                          change.

                                server {
                                  location
                                  /v_host1/ {
                                      root
                                  /path/to/v_host1;
                                  }
                                  location
                                  /v_host2/ {
                                      root
                                  /path/to/v_host2;
                                  }

                                  --

                                  Igor S.

                                  http://sysoev.ru/en/

                              _______________________________________________
                              nginx mailing list removed_email_address@domain.invalid 

```

[http://nginx.org/mailman/listinfo/nginx\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_](http://nginx.org/mailman/listinfo/nginx _______________________________________________ )

```
                              nginx mailing list

                              removed_email_address@domain.invalid

                              http://nginx.org/mailman/listinfo/nginx

                          --

                          Igor S.

                          http://sysoev.ru/en/

                      _______________________________________________
                      nginx mailing list removed_email_address@domain.invalid 

```

[http://nginx.org/mailman/listinfo/nginx\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_](http://nginx.org/mailman/listinfo/nginx _______________________________________________ )

```
                      nginx mailing list

                      removed_email_address@domain.invalid

                      http://nginx.org/mailman/listinfo/nginx

                  --

                  Igor S.

                  http://sysoev.ru/en/

            _______________________________________________ nginx
            mailing list removed_email_address@domain.invalid 

```

[http://nginx.org/mailman/listinfo/nginx\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_](http://nginx.org/mailman/listinfo/nginx _______________________________________________ )

```
            nginx mailing list

            removed_email_address@domain.invalid

            http://nginx.org/mailman/listinfo/nginx

        --

        Igor S.

        http://sysoev.ru/en/

    _______________________________________________

```

nginx  
mailing list  
removed\_email\_address@domain.invalid  
[nginx Info Page](http://nginx.org/mailman/listinfo/nginx)

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 2:45pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/12 "2011-03-04T14:45:12Z")

</div>

Alex;

Try reading the nginx wiki; It is very informative and can guide you  
very well;

If you need someone to do it for you; perhaps you should consider paid  
support.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 3:54pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/13 "2011-03-04T15:54:00Z")

</div>

check your server blocks;

you seem to have quite a few;

you only need one in your case.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 3:47pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/14 "2011-03-04T15:47:36Z")

</div>

So here’s what I have, all I can do at this point is navigate to  
xxx.xxx.xxx.xxx but not to xxx.xxx.xxx.xxx/phpmyadmin:  
user www-data;worker\_processes 4;  
error\_log /var/log/nginx/error.log;pid /var/run/nginx.pid;  
events { worker\_connections 1024; # multi\_accept on;}  
http { include /etc/nginx/mime.types;  
access\_log /var/log/nginx/access.log;  
sendfile on; #tcp\_nopush on;  
#keepalive\_timeout 0; keepalive\_timeout 65; tcp\_nodelay  
on;  
gzip on; gzip\_disable "MSIE [1-6].(?!._SV1)";  
include /etc/nginx/conf.d/_.conf; include  
/etc/nginx/sites-enabled/_;  
server { access\_log  
/var/log/nginx/admin.api.frapi/access.log;  
location /api { if (-f $request\_filename) { break;  
}  
rewrite ^/(._)$ /index.php?$1 last; root  
/var/www/api/src/frapi/admin/public; index index.php; }  
location ~ .php$ { fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_index index.php; fastcgi\_param SCRIPT\_FILENAME  
/var/www/api/src/frapi/admin/public/$fastcgi\_script\_name; include  
fastcgi\_params; } }  
server {  
access\_log /var/log/nginx/localhost.access.log;  
root /usr/share/phpmyadmin; index index.php;  
location /phpmyadmin { try\_files $uri $uri/  
@phpmyadmin; }  
location @phpmyadmin { fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_param SCRIPT\_FILENAME /usr/share/phpmyadmin/index.php;  
include /etc/nginx/fastcgi\_params; fastcgi\_param SCRIPT\_NAME  
/index.php; }  
# pass the PHP scripts to FastCGI server listening on  
127.0.0.1:9000 # location ~ .php$ { fastcgi\_pass  
127.0.0.1:9000; fastcgi\_index index.php; fastcgi\_param  
SCRIPT\_FILENAME /usr/share/phpmyadmin$fastcgi\_script\_name;  
include fastcgi\_params; } }  
server { listen 80 default;  
access\_log /var/log/nginx/localhost.access.log;  
location / { root /var/www/nginx-default;  
index index.html index.htm; }  
location /doc { root /usr/share;  
autoindex on; allow 127.0.0.1; deny all;  
}  
location /images { root /usr/share;  
autoindex on; }  
#error\_page 404 /404.html;  
# redirect server error pages to the static page /50x.html

# #error\_page 500 502 503 504 /50x.html; #location =

/50x.html { # root /var/www/nginx-default; #}  
# proxy the PHP scripts to Apache listening on 127.0.0.1:80

# #location ~ .php$ { #proxy\_pass

[http://127.0.0.1](http://127.0.0.1); #}  
# pass the PHP scripts to FastCGI server listening on  
127.0.0.1:9000 # location ~ .php$ {  
fastcgi\_pass 127.0.0.1:9000; fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME  
/var/www/nginx-default$fastcgi\_script\_name; include  
fastcgi\_params; }  
# deny access to .htaccess files, if Apache’s document root

# concurs with nginx’s one # location ~ /.ht {

deny all; }}

}

Date: Fri, 4 Mar 2011 08:44:23 -0500  
From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

```
Alex;

Try reading the nginx wiki; It is very informative and can guide you
very well;

If you need someone to do it for you; perhaps you should consider
paid support.

On 3/4/11 8:38 AM, Alex H wrote:

  So I am confused as which one should I actually edit... there is a
  nginx.conf and there is a default in the sites-enabled folder..

  Date: Fri, 4 Mar 2011 09:34:00 +0100

  From: removed_email_address@domain.invalid

  To: removed_email_address@domain.invalid

  Subject: Re: virtual host in one ip address

  Hello,

  what does noit work exactly. As I can see there may be a
  fastcgi_pass missing to handle php (ex /phpmyadmin) and maybe
  index documents need to be set.

  Greets

  Pascal

  Am 04.03.2011 08:06, schrieb Alex H:

     It
      just doesn't work, here's my .conf:

      user

          www-data;
      worker_processes

           4;

      error_log

           /var/log/nginx/error.log;
      pid
                 /var/run/nginx.pid;

      events

          {

           worker_connections 1024;

           # multi_accept on;
      }

      http

          {

           include /etc/nginx/mime.types;

           server {

               location /phpmyadmin/ {

                       root /usr/share/phpmyadmin;

               }

               location /apiadmin/ {

                       root /var/www/api/src/frapi/admin/public;

               }

           }

           access_log /var/log/nginx/access.log;

           sendfile on;

           #tcp_nopush on;

           #keepalive_timeout 0;

           keepalive_timeout 65;

           tcp_nodelay on;

           gzip on;

           gzip_disable "MSIE [1-6]\.(?!.*SV1)";

           include /etc/nginx/conf.d/*.conf;

           include /etc/nginx/sites-enabled/*;
      }

      #
          mail {
      #
              # See sample authentication script at:
      #
              # 

```

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

#  
#  
# auth\_http localhost/auth.php;  
#  
# pop3\_capabilities “TOP” “USER”;  
#  
# imap\_capabilities “IMAP4rev1” “UIDPLUS”;  
#  
#  
server {  
#  
listen localhost:110;  
#  
protocol pop3;  
#  
proxy on;  
#  
}  
#  
#  
server {  
#  
listen localhost:143;  
#  
protocol imap;  
#  
proxy on;  
#  
}  
#  
}

```
      and just for an FYI, in my sites-enabled I have:

      server {

              listen 80;
              server_name php.example.com;

              access_log /var/log/nginx/localhost.access.log;

              root /usr/share/phpmyadmin;
              index index.php;

              location / {
              try_files $uri $uri/ @phpmyadmin;
              }

              location @phpmyadmin {
              fastcgi_pass 127.0.0.1:9000;
              fastcgi_param SCRIPT_FILENAME
        /usr/share/phpmyadmin/index.php;
              include /etc/nginx/fastcgi_params;
              fastcgi_param SCRIPT_NAME /index.php;
              }

              # pass the PHP scripts to FastCGI server
        listening on 127.0.0.1:9000
              #
              location ~ \.php$ {
              fastcgi_pass 127.0.0.1:9000;
              fastcgi_index index.php;
              fastcgi_param SCRIPT_FILENAME
         /usr/share/phpmyadmin$fastcgi_script_nam
                                   e;
              include fastcgi_params;
              }
      }

      this is the virtual host that I want to be accessed via
        xxx.xxx.xxx.xxx/phpmyadmin

      From: removed_email_address@domain.invalid

      Date:
        Fri, 4 Mar 2011 09:35:10 +0300

      To: removed_email_address@domain.invalid

      Subject:

        Re: virtual host in one ip address

              -conf-path=/etc/nginx/nginx.conf

        On Mar 4, 2011, at 9:31 , Alex H wrote:

              configure arguments:
                --conf-path=/etc/nginx/nginx.conf
                --error-log-path=/var/log/nginx/error.log
                --pid-path=/var/run/nginx.pid
                --lock-path=/var/lock/nginx.lock
                --http-log-path=/var/log/nginx/access.log
                --http-client-body-temp-path=/var/lib/nginx/body
                --http-proxy-temp-path=/var/lib/nginx/proxy
                --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
                --with-debug --with-http_stub_status_module
                --with-http_flv_module --with-http_ssl_module
                --with-http_dav_module
                --with-http_gzip_static_module
                --with-http_realip_module --with-mail
                --with-mail_ssl_module --with-ipv6
                --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

              From: removed_email_address@domain.invalid

              Date: Fri, 4 Mar 2011 09:21:10 +0300

              To: removed_email_address@domain.invalid

              Subject: Re: virtual host in one ip address

              What does "nginx -V " show ?

                  On Mar 4, 2011, at 9:17 , Alex H wrote:

                      Where is this
                        config file that I need to edit?

                        From: removed_email_address@domain.invalid

                        Date: Fri, 4 Mar 2011 09:15:26 +0300

                        To: removed_email_address@domain.invalid

                        Subject: Re: virtual host in one ip address

                          On Mar 4, 2011, at 9:10 , Alex H
                            wrote:

                              Is this on the default of
                                the nginx.conf?

                          I do not know what do you mean by
                            default. The whole configuration is like

                          http {
                              server {
                                  location
                              /v_host1/ {
                                  }
                                  location
                              /v_host1/ {
                                  }
                              }
                          }

                          That's all.

                              From: removed_email_address@domain.invalid

                                Date: Fri, 4 Mar 2011 09:01:33 +0300

                                To: removed_email_address@domain.invalid

                                Subject: Re: virtual host in one ip
                                address

                                  On Mar 4, 2011, at 7:22 ,
                                    Alex H wrote:

                                            I have a rackspace
                                            server running with
                                            nginx. I am a newbie to
                                            all the server stuff.
                                            Let me explain the
                                            situation here:

                                            I have
                                              an IP address and I
                                              have two virtual host
                                              on my machine.
                                            I don't
                                              have a domain and I
                                              don't want to buy one
                                            I want
                                              to map it so I can
                                              access the website as
                                              xxx.xxx.xxx.xxx/v_host1

                                              and
                                              xxx.xxx.xxx.xxx/v_host2

                                          How can I
                                            do this the easy way? I
                                            am guessing I should
                                            change the nginx config
                                            of my site... but not
                                            sure which one to
                                            change.

                                  server {

                                     location /v_host1/ {

                                     root /path/to/v_host1;
                                    }

                                     location /v_host2/ {

                                     root /path/to/v_host2;
                                    }

                                    --

                                    Igor S.

                                    http://sysoev.ru/en/

                                _______________________________________________

                                nginx mailing list removed_email_address@domain.invalid 

```

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
                                nginx mailing list

                                removed_email_address@domain.invalid

                                http://nginx.org/mailman/listinfo/nginx

                            --

                            Igor S.

                            http://sysoev.ru/en/

                        _______________________________________________

                        nginx mailing list removed_email_address@domain.invalid 

```

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
                        nginx mailing list

                        removed_email_address@domain.invalid

                        http://nginx.org/mailman/listinfo/nginx

                    --

                    Igor S.

                    http://sysoev.ru/en/

              _______________________________________________ nginx
              mailing list removed_email_address@domain.invalid 

```

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
              nginx mailing list

              removed_email_address@domain.invalid

              http://nginx.org/mailman/listinfo/nginx

          --

          Igor S.

          http://sysoev.ru/en/

      _______________________________________________

```

nginx

```
        mailing list removed_email_address@domain.invalid 

```

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

* * *

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
  _______________________________________________
  nginx mailing list
  removed_email_address@domain.invalid
  http://nginx.org/mailman/listinfo/nginx

```

* * *

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 4:04pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/15 "2011-03-04T16:04:50Z")

</div>

Hello,

you should set all locations in one server block if just using the ip  
since nginx will use the first (best?) block matchig (should be the one  
listen 80 default; here) and just ignores the others.

Greets  
Pascal

Am 04.03.2011 15:45, schrieb Alex H:

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 4:06pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/16 "2011-03-04T16:06:08Z")

</div>

I think you should start from scratch using a very simple config.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 5, 2011, 8:38am UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/17 "2011-03-05T08:38:32Z")

</div>

Would not advise keeping your phpmyadmin directory public - change it to  
something more obscure like phpmyadmin111 or something random. I’ve seen  
too many webservers compromised because of a phpmyadmin installation  
being far behind on an upgrade or you can restrict it to your IP.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 4:03pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/18 "2011-03-04T16:03:34Z")

</div>

Yea, sorry that was the old config file.. Here’s the new one… which  
still fails:  
user www-data;worker\_processes 4;  
error\_log /var/log/nginx/error.log;pid /var/run/nginx.pid;  
events { worker\_connections 1024; # multi\_accept on;}  
http { include /etc/nginx/mime.types;  
access\_log /var/log/nginx/access.log;  
sendfile on; #tcp\_nopush on;  
#keepalive\_timeout 0; keepalive\_timeout 65; tcp\_nodelay  
on;  
gzip on; gzip\_disable "MSIE [1-6].(?!._SV1)";  
include /etc/nginx/conf.d/_.conf; include  
/etc/nginx/sites-enabled/_;  
server { listen 80 default;  
access\_log /var/log/nginx/localhost.access.log;  
location / { root /var/www/nginx-default;  
index index.html index.htm; }  
location /api { if (-f $request\_filename) {  
break; }  
rewrite ^/(._)$ /index.php?$1 last;  
root /var/www/api/src/frapi/admin/public; index  
index.php; }  
location /phpmyadmin { root  
/usr/share/phpmyadmin; index index.php;  
fastcgi\_pass 127.0.0.1:9000;  
fastcgi\_param SCRIPT\_FILENAME /usr/share/phpmyadmin/index.php;  
include /etc/nginx/fastcgi\_params; fastcgi\_param  
SCRIPT\_NAME /index.php; }  
location /doc { root /usr/share;  
autoindex on; allow 127.0.0.1; deny all;  
}  
location /images { root /usr/share;  
autoindex on; }  
#error\_page 404 /404.html;  
# redirect server error pages to the static page /50x.html

# #error\_page 500 502 503 504 /50x.html; #location =

/50x.html { # root /var/www/nginx-default; #}  
# proxy the PHP scripts to Apache listening on 127.0.0.1:80

# #location ~ .php$ { #proxy\_pass

[http://127.0.0.1](http://127.0.0.1); #}  
# pass the PHP scripts to FastCGI server listening on  
127.0.0.1:9000 # location ~ .php$ {  
fastcgi\_pass 127.0.0.1:9000; fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME  
/var/www/nginx-default$fastcgi\_script\_name; include  
fastcgi\_params; }  
# deny access to .htaccess files, if Apache’s document root

# concurs with nginx’s one # location ~ /.ht {

deny all; }}

}

Date: Fri, 4 Mar 2011 09:53:06 -0500  
From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: virtual host in one ip address

```
Message body

check your server blocks;

you seem to have quite a few;

you only need one in your case.

On 3/4/11 9:45 AM, Alex H wrote:

  So here's
    what I have, all I can do at this point is navigate to
    xxx.xxx.xxx.xxx but not to xxx.xxx.xxx.xxx/phpmyadmin:

    user
        www-data;
    worker_processes
         4;

    error_log
         /var/log/nginx/error.log;
    pid
             /var/run/nginx.pid;

    events
        {

         worker_connections 1024;
        #
        multi_accept on;
    }

    http
        {

         include /etc/nginx/mime.types;

         access_log /var/log/nginx/access.log;

         sendfile on;

         #tcp_nopush on;

         #keepalive_timeout 0;

         keepalive_timeout 65;

         tcp_nodelay on;

         gzip on;

         gzip_disable "MSIE [1-6]\.(?!.*SV1)";

         include /etc/nginx/conf.d/*.conf;

         include /etc/nginx/sites-enabled/*;

         server {

           access_log /var/log/nginx/admin.api.frapi/access.log;

         location /api {

           if (-f $request_filename) {

               break;

           }

           rewrite ^/(.*)$ /index.php?$1 last;

           root /var/www/api/src/frapi/admin/public;

           index index.php;
        }

         location ~ \.php$ {

           fastcgi_pass 127.0.0.1:9000;

           fastcgi_index index.php;

           fastcgi_param SCRIPT_FILENAME
         /var/www/api/src/frapi/admin/public/$fastcgi_script_name;

           include fastcgi_params;

        }
        }

         server {

           access_log /var/log/nginx/localhost.access.log;

           root /usr/share/phpmyadmin;

           index index.php;

           location /phpmyadmin {

                   try_files $uri $uri/ @phpmyadmin;

           }

           location @phpmyadmin {

           fastcgi_pass 127.0.0.1:9000;

           fastcgi_param SCRIPT_FILENAME
        /usr/share/phpmyadmin/index.php;

           include /etc/nginx/fastcgi_params;

           fastcgi_param SCRIPT_NAME /index.php;

           }

           # pass the PHP scripts to FastCGI server listening on
        127.0.0.1:9000

           #

           location ~ \.php$ {

           fastcgi_pass 127.0.0.1:9000;

           fastcgi_index index.php;

           fastcgi_param SCRIPT_FILENAME
         /usr/share/phpmyadmin$fastcgi_script_name;

           include fastcgi_params;

           }

        }

         server {

           listen 80 default;

           access_log /var/log/nginx/localhost.access.log;

           location / {

                   root /var/www/nginx-default;

                   index index.html index.htm;

           }

           location /doc {

                   root /usr/share;

                   autoindex on;

                   allow 127.0.0.1;

                   deny all;

           }

           location /images {

                   root /usr/share;

                   autoindex on;

           }

           #error_page 404 /404.html;

           # redirect server error pages to the static page
        /50x.html

           #

           #error_page 500 502 503 504 /50x.html;

           #location = /50x.html {

           # root /var/www/nginx-default;

           #}

           # proxy the PHP scripts to Apache listening on
        127.0.0.1:80

           #

           #location ~ \.php$ {

                   #proxy_pass http://127.0.0.1;

           #}

           # pass the PHP scripts to FastCGI server listening on
        127.0.0.1:9000

           #

           location ~ \.php$ {

                   fastcgi_pass 127.0.0.1:9000;

                   fastcgi_index index.php;

                   fastcgi_param SCRIPT_FILENAME
         /var/www/nginx-default$fastcgi_script_name;

                   include fastcgi_params;

           }

           # deny access to .htaccess files, if Apache's document
        root

           # concurs with nginx's one

           #

           location ~ /\.ht {

                   deny all;

           }
    }

    }

    Date:
      Fri, 4 Mar 2011 08:44:23 -0500

    From:
      removed_email_address@domain.invalid

    To:
      removed_email_address@domain.invalid

    Subject:
      Re: virtual host in one ip address

     Alex;

     Try
      reading the nginx wiki; It is very informative and can guide
      you very well;

     If you
      need someone to do it for you; perhaps you should consider
      paid support.

     On 3/4/11
      8:38 AM, Alex H wrote:

       So I am confused as which one should I actually edit... there
      is a nginx.conf and there is a default in the sites-enabled
      folder..

      Date: Fri, 4 Mar 2011 09:34:00 +0100

      From: removed_email_address@domain.invalid

      To: removed_email_address@domain.invalid

      Subject: Re: virtual host in one ip address

      Hello,

      what does noit work exactly. As I can see there may be a
      fastcgi_pass missing to handle php (ex /phpmyadmin) and maybe
      index documents need to be set.

      Greets

      Pascal

      Am 04.03.2011 08:06, schrieb Alex H:

         It
          just doesn't work, here's my .conf:

          user www-data;
          worker_processes 4;

          error_log /var/log/nginx/error.log;
          pid /var/run/nginx.pid;

          events {
              worker_connections 1024;
              # multi_accept on;
          }

          http {
              include /etc/nginx/mime.types;

              server {
                  location /phpmyadmin/ {
                          root /usr/share/phpmyadmin;
                  }

                  location /apiadmin/ {
                          root
               /var/www/api/src/frapi/admin/public;
                  }
              }

              access_log /var/log/nginx/access.log;

              sendfile on;
              #tcp_nopush on;

              #keepalive_timeout 0;
              keepalive_timeout 65;
              tcp_nodelay on;

              gzip on;
              gzip_disable "MSIE [1-6]\.(?!.*SV1)";

              include /etc/nginx/conf.d/*.conf;
              include /etc/nginx/sites-enabled/*;
          }

          # mail {
          # # See sample authentication script at:
          # # 

```

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

#  
# # auth\_http localhost/auth.php;  
# # pop3\_capabilities “TOP” “USER”;  
# # imap\_capabilities “IMAP4rev1”  
“UIDPLUS”;  
#  
# server {  
# listen localhost:110;  
# protocol pop3;  
# proxy on;  
# }  
#  
# server {  
# listen localhost:143;  
# protocol imap;  
# proxy on;  
# }  
# }

```
          and just for an FYI, in my sites-enabled I have:

          server {

                  listen 80;
                  server_name php.example.com;

                  access_log
            /var/log/nginx/localhost.access.log;

                  root /usr/share/phpmyadmin;
                  index index.php;

                  location / {
                  try_files $uri $uri/ @phpmyadmin;
                  }

                  location @phpmyadmin {
                  fastcgi_pass 127.0.0.1:9000;
                  fastcgi_param SCRIPT_FILENAME
            /usr/share/phpmyadmin/index.php;
                  include /etc/nginx/fastcgi_params;
                  fastcgi_param SCRIPT_NAME /index.php;
                  }

                  # pass the PHP scripts to FastCGI server
            listening on 127.0.0.1:9000
                  #
                  location ~ \.php$ {
                  fastcgi_pass 127.0.0.1:9000;
                  fastcgi_index index.php;
                  fastcgi_param SCRIPT_FILENAME
             /usr/share/phpmyadmin$fastcgi_script_nam
                                           e;
                  include fastcgi_params;
                  }
          }

          this is the virtual host that I want to be accessed
            via xxx.xxx.xxx.xxx/phpmyadmin

          From: removed_email_address@domain.invalid

          Date:

            Fri, 4 Mar 2011 09:35:10 +0300

          To:
            removed_email_address@domain.invalid

          Subject:

            Re: virtual host in one ip address

                  -conf-path=/etc/nginx/nginx.conf

            On Mar 4, 2011, at 9:31 , Alex H wrote:

                  configure arguments:
                    --conf-path=/etc/nginx/nginx.conf
                    --error-log-path=/var/log/nginx/error.log
                    --pid-path=/var/run/nginx.pid
                    --lock-path=/var/lock/nginx.lock
                    --http-log-path=/var/log/nginx/access.log
                    --http-client-body-temp-path=/var/lib/nginx/body
                    --http-proxy-temp-path=/var/lib/nginx/proxy
                    --http-fastcgi-temp-path=/var/lib/nginx/fastcgi
                    --with-debug --with-http_stub_status_module
                    --with-http_flv_module --with-http_ssl_module
                    --with-http_dav_module
                    --with-http_gzip_static_module
                    --with-http_realip_module --with-mail
                    --with-mail_ssl_module --with-ipv6
                    --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

                  From: removed_email_address@domain.invalid

                  Date: Fri, 4 Mar 2011 09:21:10 +0300

                  To: removed_email_address@domain.invalid

                  Subject: Re: virtual host in one ip address

                  What does "nginx -V " show ?

                      On Mar 4, 2011, at 9:17 , Alex H wrote:

                          Where is this config file that
                            I need to edit?

                            From: removed_email_address@domain.invalid

                            Date: Fri, 4 Mar 2011 09:15:26 +0300

                            To: removed_email_address@domain.invalid

                            Subject: Re: virtual host in one ip
                            address

                              On Mar 4, 2011, at 9:10 , Alex H
                                wrote:

                                  Is this on
                                    the default of the nginx.conf?

                              I do not know what do you mean by
                                default. The whole configuration is
                                like

                              http {
                                  server {

                                   location /v_host1/ {
                                      }

                                   location /v_host1/ {
                                      }
                                  }
                              }

                              That's all.

                                  From: removed_email_address@domain.invalid

                                    Date: Fri, 4 Mar 2011 09:01:33
                                    +0300

                                    To: removed_email_address@domain.invalid

                                    Subject: Re: virtual host in one
                                    ip address

                                      On Mar 4, 2011, at 7:22 ,
                                        Alex H wrote:

                                                I have a rackspace
                                                server running with
                                                nginx. I am a newbie
                                                to all the server
                                                stuff. Let me
                                                explain the
                                                situation here:

                                                I
                                                  have an IP address
                                                  and I have two
                                                  virtual host on my
                                                  machine.
                                                I
                                                  don't have a
                                                  domain and I don't
                                                  want to buy one
                                                I
                                                  want to map it so
                                                  I can access the
                                                  website as
                                                  xxx.xxx.xxx.xxx/v_host1
                                                  and
                                                  xxx.xxx.xxx.xxx/v_host2

                                              How can
                                                I do this the easy
                                                way? I am guessing I
                                                should change the
                                                nginx config of my
                                                site... but not sure
                                                which one to change.

                                      server
                                        {

                                         location /v_host1/ {

                                         root /path/to/v_host1;
                                        }

                                         location /v_host2/ {

                                         root /path/to/v_host2;
                                        }

                                        --

                                        Igor S.

                                        http://sysoev.ru/en/

                                    _______________________________________________

                                    nginx mailing list 

```

[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
                                    nginx mailing list

                                    removed_email_address@domain.invalid

                                    http://nginx.org/mailman/listinfo/nginx

                                --

                                Igor S.

                                http://sysoev.ru/en/

                            _______________________________________________

                            nginx mailing list removed_email_address@domain.invalid 

```

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
                            nginx mailing list

                            removed_email_address@domain.invalid

                            http://nginx.org/mailman/listinfo/nginx

                        --

                        Igor S.

                        http://sysoev.ru/en/

                  _______________________________________________
                  nginx mailing list removed_email_address@domain.invalid 

```

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
                  nginx mailing list

                  removed_email_address@domain.invalid

                  http://nginx.org/mailman/listinfo/nginx

              --

              Igor S.

              http://sysoev.ru/en/

          _______________________________________________

```

nginx

```
            mailing list removed_email_address@domain.invalid 

```

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

* * *

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
      _______________________________________________ nginx mailing
      list removed_email_address@domain.invalid http://nginx.org/mailman/listinfo/nginx

```

* * *

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

```
    _______________________________________________

```

nginx  
mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

* * *

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 4, 2011, 4:19pm UTC](https://www.ruby-forum.com/t/virtual-host-in-one-ip-address/204058/19 "2011-03-04T16:19:36Z")

</div>

Why do you say that? Is the current one that I have very bad?I can see  
that the logic is there, I am separating each vhost by location just as  
you suggested…

Date: Fri, 4 Mar 2011 10:05:07 -0500  
From: removed\_email\_address@domain.invalid  
To: removed\_email\_address@domain.invalid  
Subject: Re: virtual host in one ip address

```
I think you should start from scratch using a very simple config.

On 3/4/11 10:01 AM, Alex H wrote:

  Yea, sorry
    that was the old config file.. Here's the new one... which still
    fails:

    user
        www-data;
    worker_processes
         4;

    error_log
         /var/log/nginx/error.log;
    pid
             /var/run/nginx.pid;

    events
        {

         worker_connections 1024;
        #
        multi_accept on;
    }

    http
        {

         include /etc/nginx/mime.types;

         access_log /var/log/nginx/access.log;

         sendfile on;

         #tcp_nopush on;

         #keepalive_timeout 0;

         keepalive_timeout 65;

         tcp_nodelay on;

         gzip on;

         gzip_disable "MSIE [1-6]\.(?!.*SV1)";

         include /etc/nginx/conf.d/*.conf;

         include /etc/nginx/sites-enabled/*;

         server {

           listen 80 default;

           access_log /var/log/nginx/localhost.access.log;

           location / {

                   root /var/www/nginx-default;

                   index index.html index.htm;

           }

           location /api {

                    if (-f $request_filename) {

                           break;

                    }

                   rewrite ^/(.*)$ /index.php?$1 last;

                   root /var/www/api/src/frapi/admin/public;

                   index index.php;

           }

           location /phpmyadmin {

                    root /usr/share/phpmyadmin;

                    index index.php;

                    fastcgi_pass 127.0.0.1:9000;

                    fastcgi_param SCRIPT_FILENAME
        /usr/share/phpmyadmin/index.php;

                    include /etc/nginx/fastcgi_params;

                    fastcgi_param SCRIPT_NAME /index.php;

           }

           location /doc {

                   root /usr/share;

                   autoindex on;

                   allow 127.0.0.1;

                   deny all;

           }

           location /images {

                   root /usr/share;

                   autoindex on;

           }

           #error_page 404 /404.html;

           # redirect server error pages to the static page
        /50x.html

           #

           #error_page 500 502 503 504 /50x.html;

           #location = /50x.html {

           # root /var/www/nginx-default;

           #}

           # proxy the PHP scripts to Apache listening on
        127.0.0.1:80

           #

           #location ~ \.php$ {

                   #proxy_pass http://127.0.0.1;

           #}

           # pass the PHP scripts to FastCGI server listening on
        127.0.0.1:9000

           #

           location ~ \.php$ {

                   fastcgi_pass 127.0.0.1:9000;

                   fastcgi_index index.php;

                   fastcgi_param SCRIPT_FILENAME
         /var/www/nginx-default$fastcgi_script_name;

                   include fastcgi_params;

           }

           # deny access to .htaccess files, if Apache's document
        root

           # concurs with nginx's one

           #

           location ~ /\.ht {

                   deny all;

           }
    }

    }

    Date:
      Fri, 4 Mar 2011 09:53:06 -0500

    From:
      removed_email_address@domain.invalid

    To:
      removed_email_address@domain.invalid

    Subject:
      Re: virtual host in one ip address

    Message body
     check
      your server blocks;

     you seem
      to have quite a few;

     you only
      need one in your case.

     On 3/4/11
      9:45 AM, Alex H wrote:

       So
        here's what I have, all I can do at this point is navigate
        to xxx.xxx.xxx.xxx but not to xxx.xxx.xxx.xxx/phpmyadmin:

        user www-data;
        worker_processes 4;

        error_log /var/log/nginx/error.log;
        pid /var/run/nginx.pid;

        events {
            worker_connections 1024;
            # multi_accept on;
        }

        http {
            include /etc/nginx/mime.types;

            access_log /var/log/nginx/access.log;

            sendfile on;
            #tcp_nopush on;

            #keepalive_timeout 0;
            keepalive_timeout 65;
            tcp_nodelay on;

            gzip on;
            gzip_disable "MSIE [1-6]\.(?!.*SV1)";

            include /etc/nginx/conf.d/*.conf;
            include /etc/nginx/sites-enabled/*;

            server {
                access_log
             /var/log/nginx/admin.api.frapi/access.log;

            location /api {
                if (-f $request_filename) {
                    break;
                }

                rewrite ^/(.*)$ /index.php?$1 last;
                root
            /var/www/api/src/frapi/admin/public;
                index index.php;
            }

            location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME
             /var/www/api/src/frapi/admin/public/$fastcgi_script_name;
                include fastcgi_params;
             }
            }

            server {

                access_log
            /var/log/nginx/localhost.access.log;

                root /usr/share/phpmyadmin;
                index index.php;

                location /phpmyadmin {
                        try_files $uri $uri/
            @phpmyadmin;
                }

                location @phpmyadmin {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_param SCRIPT_FILENAME
            /usr/share/phpmyadmin/index.php;
                include /etc/nginx/fastcgi_params;
                fastcgi_param SCRIPT_NAME /index.php;
                }

                # pass the PHP scripts to FastCGI
            server listening on 127.0.0.1:9000
                #
                location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME
             /usr/share/phpmyadmin$fastcgi_script_name;
                include fastcgi_params;
                }
             }

            server {
                listen 80 default;

                access_log
             /var/log/nginx/localhost.access.log;

                location / {
                        root /var/www/nginx-default;
                        index index.html index.htm;
                }

                location /doc {
                        root /usr/share;
                        autoindex on;
                        allow 127.0.0.1;
                        deny all;
                }

                location /images {
                        root /usr/share;
                        autoindex on;
                }

                #error_page 404 /404.html;

                # redirect server error pages to the
            static page /50x.html
                #
                #error_page 500 502 503 504
             /50x.html;
                #location = /50x.html {
                # root /var/www/nginx-default;
                #}

                # proxy the PHP scripts to Apache
            listening on 127.0.0.1:80
                #
                #location ~ \.php$ {
                        #proxy_pass http://127.0.0.1;
                #}

                # pass the PHP scripts to FastCGI
            server listening on 127.0.0.1:9000
                #
                location ~ \.php$ {
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
                        fastcgi_param SCRIPT_FILENAME
             /var/www/nginx-default$fastcgi_script_name;
                        include fastcgi_params;
                }

                # deny access to .htaccess files, if
            Apache's document root
                # concurs with nginx's one
                #
                location ~ /\.ht {
                        deny all;
                }
        }

        }

        Date: Fri, 4 Mar 2011 08:44:23
          -0500

        From:

          removed_email_address@domain.invalid

        To:
          removed_email_address@domain.invalid

        Subject:

          Re: virtual host in one ip address

          Alex;

          Try reading the nginx wiki; It is very informative and can
          guide you very well;

         If
          you need someone to do it for you; perhaps you should
          consider paid support.

         On
          3/4/11 8:38 AM, Alex H wrote:

           So I am confused as which one should I actually edit... 

```

there  
is a nginx.conf and there is a default in the  
sites-enabled folder…

```
          Date: Fri, 4 Mar 2011 09:34:00
          +0100

          From: removed_email_address@domain.invalid

          To: removed_email_address@domain.invalid

          Subject: Re: virtual host in one ip address

          Hello,

          what does noit work exactly. As I can see there may be a
          fastcgi_pass missing to handle php (ex /phpmyadmin) and
          maybe index documents need to be set.

          Greets

          Pascal

          Am 04.03.2011 08:06, schrieb Alex H:

             It
              just doesn't work, here's my .conf:

              user www-data;
              worker_processes 4;

              error_log /var/log/nginx/error.log;
              pid /var/run/nginx.pid;

              events {
                  worker_connections 1024;
                  # multi_accept on;
              }

              http {
                  include /etc/nginx/mime.types;

                  server {
                      location /phpmyadmin/ {
                              root
                   /usr/share/phpmyadmin;
                      }

                      location /apiadmin/ {
                              root
                   /var/www/api/src/frapi/admin/public;
                      }
                  }

                  access_log
                   /var/log/nginx/access.log;

                  sendfile on;
                  #tcp_nopush on;

                  #keepalive_timeout 0;
                  keepalive_timeout 65;
                  tcp_nodelay on;

                  gzip on;
                  gzip_disable "MSIE [1-6]\.(?!.*SV1)";

                  include /etc/nginx/conf.d/*.conf;
                  include /etc/nginx/sites-enabled/*;
              }

              # mail {
              # # See sample authentication script
                  at:
              # # 

```

[http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript](http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript)  
#  
# # auth\_http localhost/auth.php;  
# # pop3\_capabilities “TOP” “USER”;  
# # imap\_capabilities “IMAP4rev1”  
“UIDPLUS”;  
#  
# server {  
# listen localhost:110;  
# protocol pop3;  
# proxy on;  
# }  
#  
# server {  
# listen localhost:143;  
# protocol imap;  
# proxy on;  
# }  
# }

```
              and just for an FYI, in my sites-enabled I have:

              server {

                      listen 80;
                      server_name php.example.com;

                      access_log
                /var/log/nginx/localhost.access.log;

                      root /usr/share/phpmyadmin;
                      index index.php;

                      location / {
                      try_files $uri $uri/ @phpmyadmin;
                      }

                      location @phpmyadmin {
                      fastcgi_pass 127.0.0.1:9000;
                      fastcgi_param SCRIPT_FILENAME
                /usr/share/phpmyadmin/index.php;
                      include /etc/nginx/fastcgi_params;
                      fastcgi_param SCRIPT_NAME /index.php;
                      }

                      # pass the PHP scripts to FastCGI server
                listening on 127.0.0.1:9000
                      #
                      location ~ \.php$ {
                      fastcgi_pass 127.0.0.1:9000;
                      fastcgi_index index.php;
                      fastcgi_param SCRIPT_FILENAME
                 /usr/share/phpmyadmin$fastcgi_script_nam
                                                   e;
                      include fastcgi_params;
                      }
              }

              this is the virtual host that I want to be
                accessed via xxx.xxx.xxx.xxx/phpmyadmin

              From: removed_email_address@domain.invalid

              Date: Fri, 4 Mar 2011 09:35:10 +0300

              To: removed_email_address@domain.invalid

              Subject: Re: virtual host in one ip address

                      -conf-path=/etc/nginx/nginx.conf

                On Mar 4, 2011, at 9:31 , Alex H wrote:

                      configure arguments:
                        --conf-path=/etc/nginx/nginx.conf
                        --error-log-path=/var/log/nginx/error.log
                        --pid-path=/var/run/nginx.pid
                        --lock-path=/var/lock/nginx.lock
                        --http-log-path=/var/log/nginx/access.log
                        --http-client-body-temp-path=/var/lib/nginx/body
                        --http-proxy-temp-path=/var/lib/nginx/proxy
                        --http-fastcgi-temp-path=/var/lib/nginx/fastcgi

                        --with-debug --with-http_stub_status_module
                        --with-http_flv_module
                        --with-http_ssl_module
                        --with-http_dav_module
                        --with-http_gzip_static_module
                        --with-http_realip_module --with-mail
                        --with-mail_ssl_module --with-ipv6
                        --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

                      From: removed_email_address@domain.invalid

                      Date: Fri, 4 Mar 2011 09:21:10 +0300

                      To: removed_email_address@domain.invalid

                      Subject: Re: virtual host in one ip address

                      What does "nginx -V " show ?

                          On Mar 4, 2011, at 9:17 , Alex H
                            wrote:

                              Where is this config file
                                that I need to edit?

                                From: removed_email_address@domain.invalid

                                Date: Fri, 4 Mar 2011 09:15:26 +0300

                                To: removed_email_address@domain.invalid

                                Subject: Re: virtual host in one ip
                                address

                                  On Mar 4, 2011, at 9:10 ,
                                    Alex H wrote:

                                      Is
                                        this on the default of the
                                        nginx.conf?

                                  I do not know what do you
                                    mean by default. The whole
                                    configuration is like

                                  http {

                                       server {

                                       location /v_host1/ {
                                          }

                                       location /v_host1/ {
                                          }
                                      }
                                  }

                                  That's
                                      all.

                                      From: removed_email_address@domain.invalid

                                        Date: Fri, 4 Mar 2011
                                        09:01:33 +0300

                                        To: removed_email_address@domain.invalid

                                        Subject: Re: virtual host in
                                        one ip address

                                          On Mar 4, 2011, at
                                            7:22 , Alex H wrote:

                                                    I have a
                                                    rackspace server
                                                    running with
                                                    nginx. I am a
                                                    newbie to all
                                                    the server
                                                    stuff. Let me
                                                    explain the
                                                    situation here:

                                                    I
                                                      have an IP
                                                      address and I
                                                      have two
                                                      virtual host
                                                      on my machine.
                                                    I
                                                      don't have a
                                                      domain and I
                                                      don't want to
                                                      buy one
                                                    I
                                                      want to map it
                                                      so I can
                                                      access the
                                                      website as
                                                      xxx.xxx.xxx.xxx/v_host1
                                                      and
                                                      xxx.xxx.xxx.xxx/v_host2

                                                  How
                                                    can I do this
                                                    the easy way? I
                                                    am guessing I
                                                    should change
                                                    the nginx config
                                                    of my site...
                                                    but not sure
                                                    which one to
                                                    change.

                                          server

                                            {

                                             location /v_host1/ {

                                                 root
                                            /path/to/v_host1;

                                             }

                                             location /v_host2/ {

                                                 root
                                            /path/to/v_host2;

                                             }

                                            --

                                            Igor S.

                                            http://sysoev.ru/en/

                                        _______________________________________________

                                        nginx mailing list 

```

removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_](http://nginx.org/mailman/listinfo/nginx _______________________________________________ )

```
                                        nginx mailing list

                                        removed_email_address@domain.invalid

                                        http://nginx.org/mailman/listinfo/nginx

                                    --

                                    Igor S.

                                    http://sysoev.ru/en/

                                _______________________________________________

                                nginx mailing list removed_email_address@domain.invalid 

```

[http://nginx.org/mailman/listinfo/nginx\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_](http://nginx.org/mailman/listinfo/nginx _______________________________________________ )

```
                                nginx mailing list

                                removed_email_address@domain.invalid

                                http://nginx.org/mailman/listinfo/nginx

                            --

                            Igor S.

                            http://sysoev.ru/en/

                      _______________________________________________

                      nginx mailing list removed_email_address@domain.invalid 

```

[http://nginx.org/mailman/listinfo/nginx\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_](http://nginx.org/mailman/listinfo/nginx _______________________________________________ )

```
                      nginx mailing list

                      removed_email_address@domain.invalid

                      http://nginx.org/mailman/listinfo/nginx

                  --

                  Igor S.

                  http://sysoev.ru/en/

              _______________________________________________

```

nginx

```
                mailing list removed_email_address@domain.invalid
                http://nginx.org/mailman/listinfo/nginx

```

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

```
          _______________________________________________ nginx
          mailing list removed_email_address@domain.invalid 

```

[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

```
        _______________________________________________

```

nginx

```
          mailing list removed_email_address@domain.invalid 

```

[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

```
    _______________________________________________

```

nginx  
mailing list  
removed\_email\_address@domain.invalid  
[nginx Info Page](http://nginx.org/mailman/listinfo/nginx)

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)
