 |
Linode Forum Linode Community Forums
|
| Author |
Message |
rws
Joined: 18 Jul 2010
Posts: 2
|
| Posted: Sun Jul 18, 2010 9: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? |
|
| Back to top |
|
vonskippy
Joined: 27 Dec 2009
Posts: 469
Location: Colorado, USA
|
| Posted: Sun Jul 18, 2010 9: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 |
|
| Back to top |
|
rws
Joined: 18 Jul 2010
Posts: 2
|
| Posted: Mon Jul 19, 2010 4: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. |
|
| Back to top |
|
| |
|