Results 1 to 5 of 5
-
22nd Sep 2011, 05:14 PM #1OPMember
troubles with virtual hosts help ^_^
Hi,
Sorry for the large number of my questions..
Should i call myself NGINX .. again i have quastions about nginx..
my problem is .. my server show default apache page.
my settings:
1. nginx.conf
Code:user nginx; worker_processes 1; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; server_names_hash_bucket_size 64; access_log /var/log/nginx/access.log; sendfile on; keepalive_timeout 65; tcp_nodelay on; gzip on; include /etc/nginx/conf.d/*.conf; }
Code:server { listen 80; server_name _; location / { proxy_pass http://127.0.0.1:8080/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } }
Code:.... .... Listen 8080 .... .... LoadModule rpaf_module modules/mod_rpaf-2.0.so # added this line after installing module ... ... Include /etc/httpd/conf/kloxo/kloxo.conf RPAFenable On RPAFsethostname Off RPAFproxy_ips 127.0.0.1 myrealipserver RPAFheader X-Real-IP
and when i put multi virtual hosts on httpd.conf like that:
Code:NameVirtualHost *:8080 <VirtualHost *:8080> ServerAdmin admin@domain1.com DocumentRoot /home/domain1/domain1.com/ ServerName domain1.com ErrorLog logs/dummy-host.domain1.com-error_log CustomLog logs/dummy-host.domain1.com-access_log common </VirtualHost> <VirtualHost *:8080> ServerAdmin admin@domain2.com DocumentRoot /home/domain2/domain2.com/ ServerName domain2.com ErrorLog logs/dummy-host.domain2.com-error_log CustomLog logs/dummy-host.domain2.com-access_log common </VirtualHost> <VirtualHost *:8080> ServerAdmin admin@domain3.com DocumentRoot /home/domain3/domain3.com/ ServerName domain3.com ErrorLog logs/dummy-host.domain3.com-error_log CustomLog logs/dummy-host.domain3.com-access_log common </VirtualHost>
i want to see domain2 when i visit domain2 ... and 3 if i visit domain3 but in my case all time i see domain1
so what's wrong ? how can i fix it ? and run all domains ?chiwan Reviewed by chiwan on . troubles with virtual hosts help ^_^ Hi, Sorry for the large number of my questions.. Should i call myself NGINX .. again i have quastions about nginx.. my problem is .. my server show default apache page. my settings: 1. nginx.conf user nginx; worker_processes 1; Rating: 5
-
22nd Sep 2011, 07:07 PM #2Respected Member
I don't use it but their website examples look nothing like yours.
Virtual Hosts Examples
Two Virtual Hosts, Serving Static Files
http {
index index.html;
server {
server_name www.domain1.com;
access_log logs/domain1.access.log main;
root /var/www/domain1.com/htdocs;
}
server {
server_name www.domain2.com;
access_log logs/domain2.access.log main;
root /var/www/domain2.com/htdocs;
}
-
23rd Sep 2011, 07:51 AM #3OPMember
any help ?
-
23rd Sep 2011, 03:29 PM #4Member
Ok, if your server responds with domain1 on accessing any of the other domain hosted on the server, I guess its a problem with the NameVirtualHost entry of the IP you are using.
Edit the apache configuration file and check if there is a below entry above the first domains VirtualHost entry
NameVirtualHost IP:80
If it doesnt work, have someone look into the server for you.Linux System Administrator
Server Management at affordable cost.
linuxhostingsupport.net | MSN:madaboutlinux@hotmail.com
-
23rd Sep 2011, 09:50 PM #5OPMember
ok thank u
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Run different PHP versions on virtual hosts in apache 2.2
By MarPlo in forum Server ManagementReplies: 8Last Post: 5th Sep 2012, 09:43 PM -
Category/Forum Troubles
By S?nic in forum vBulletinReplies: 3Last Post: 4th May 2012, 05:08 AM -
anyone ever got into troubles?
By pipikaka in forum File Host DiscussionReplies: 42Last Post: 29th Nov 2011, 04:54 AM -
Having troubles in my vps
By tvg in forum Webmaster DiscussionReplies: 0Last Post: 16th Dec 2010, 06:56 AM
themaPoster - post to forums and...
Version 5.22 released. Open older version (or...