virtual host in one ip address
Alex H
aditya15417 at hotmail.com
Fri Mar 4 10:06:06 MSK 2011
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: igor at sysoev.ru
Date: Fri, 4 Mar 2011 09:35:10 +0300
To: nginx at nginx.org
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: igor at sysoev.ru
Date: Fri, 4 Mar 2011 09:21:10 +0300
To: nginx at nginx.org
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: igor at sysoev.ru
Date: Fri, 4 Mar 2011 09:15:26 +0300
To: nginx at nginx.org
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: igor at sysoev.ru
Date: Fri, 4 Mar 2011 09:01:33 +0300
To: nginx at nginx.org
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 Sysoev
http://sysoev.ru/en/
_______________________________________________ nginx mailing list nginx at nginx.org http://nginx.org/mailman/listinfo/nginx_______________________________________________
nginx mailing list
nginx at nginx.org
http://nginx.org/mailman/listinfo/nginx
--
Igor Sysoev
http://sysoev.ru/en/
_______________________________________________ nginx mailing list nginx at nginx.org http://nginx.org/mailman/listinfo/nginx_______________________________________________
nginx mailing list
nginx at nginx.org
http://nginx.org/mailman/listinfo/nginx
--
Igor Sysoev
http://sysoev.ru/en/
_______________________________________________ nginx mailing list nginx at nginx.org http://nginx.org/mailman/listinfo/nginx_______________________________________________
nginx mailing list
nginx at nginx.org
http://nginx.org/mailman/listinfo/nginx
--
Igor Sysoev
http://sysoev.ru/en/
_______________________________________________
nginx mailing list
nginx at nginx.org
http://nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110304/2fc33d83/attachment-0001.html>
More information about the nginx
mailing list