Linode Forum
https://forum.linode.com/

Hosting 2 Sites - Can't get 2nd domain pointed correctly
https://forum.linode.com/viewtopic.php?f=19&t=5817
Page 1 of 1

Author:  rws [ Sun Jul 18, 2010 10:12 pm ]
Post subject:  Hosting 2 Sites - Can't get 2nd domain pointed correctly

I am trying to host two sites on my linode.

I have the first one set up and running a wp installation at

home/rws/public_html/<sitename>/

The second site should point to

home/rws/public_html/<sitename_two>/

...but, I have the second domain pointing to my linode nameservers, but when I try to browse to that domain in a browser, i arrive at the first domain.

Does anyone know what step I may have missed, or a good document/tutorial/help article that may help me get it straightened out?

What should I be looking for?

Author:  vonskippy [ Sun Jul 18, 2010 10:59 pm ]
Post subject:  Re: Hosting 2 Sites - Can't get 2nd domain pointed correctly

rws wrote:
What should I be looking for?


VHOST setup

Author:  rws [ Mon Jul 19, 2010 5:52 am ]
Post subject: 

Thanks vonskippy,

I've double checked everything, have created all the files/entries for the second domain, but when trying to hit in in the browser, I still get a redirect to my first domain.

I've done the following for each (replacing the <domain1> with my real domain, etc...):

Code:
sudo nano /usr/local/nginx/sites-available/<domain1>.com


and in those files:

Code:
server {

            listen   80;

            server_name  www.someDomain.com;

            rewrite ^/(.*) http://someDomain.com/$1 permanent;

       }

server {

            listen   80;

            server_name someDomain.com;

            access_log /home/USERNAME/public_html/someDomain.com/log/access.log;

            error_log /home/USERNAME/public_html/someDomain.com/log/error.log;

            location /  {

                        root   /home/USERNAME/public_html/someDomain.com/public/;

                        index  index.php index.html;

                        }

            # 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;

            include /usr/local/nginx/conf/fastcgi_params;

            fastcgi_param SCRIPT_FILENAME /home/USERNAME/public_html/someDomain.com/public/$fastcgi_script_name;

                        }

       }


Having one for each of the two sites, it still doesn't work.

Is there anything that I may be missing to get this working? I'm not really sure what the best troubleshooting steps are in this case.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/