Activity Stream
48,167 MEMBERS
6852 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 5 of 5
  1.     
    #1
    Member

    Default 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;
    }
    2. virtual.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;
            }
    }
    3. httpd.conf

    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 all time i see default apache page..
    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>
    if i try to visit domain2 or domain3 i see domain1 all time ..
    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

  2.   Sponsored Links

  3.     
    #2
    Respected 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;
    }

  4.     
    #3
    Member
    any help ?

  5.     
    #4
    Member
    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 there is one, remove it and add the entry above the VirtualHost entry of the server hostname and restart the Apache server.

    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

  6.     
    #5
    Member
    ok thank u

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Run different PHP versions on virtual hosts in apache 2.2
    By MarPlo in forum Server Management
    Replies: 8
    Last Post: 5th Sep 2012, 09:43 PM
  2. Category/Forum Troubles
    By S?nic in forum vBulletin
    Replies: 3
    Last Post: 4th May 2012, 05:08 AM
  3. anyone ever got into troubles?
    By pipikaka in forum File Host Discussion
    Replies: 42
    Last Post: 29th Nov 2011, 04:54 AM
  4. Having troubles in my vps
    By tvg in forum Webmaster Discussion
    Replies: 0
    Last Post: 16th Dec 2010, 06:56 AM

Tags for this Thread

BE SOCIAL