Welcome! Log In Create A New Profile

Advanced

Help please :( Multiple Domains on 1 IP Address

Posted by nginxrules 
Help please :( Multiple Domains on 1 IP Address
February 12, 2011 03:40AM
Hello, I am on an Ubuntu server using Nginx 0.8.54 and trying to set up a few wordpress sites/domains.

Currently I have multiple vhost files symlinked (one for each domain) between sites-enabled and sites available. Each one looks like the one pasted below. However I am only able to see one of the sites in a browser. The rest all just point to first one I made. I am not sure how to make this a multi domain host file while retaining the PHPScript thing underneath. I did not write this vhost file, all I did was add the include file to my wordpress rewrite rules. Please help. Thank you.


server {

listen 80;

server_name MYDOMAIN.com;

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

}

server {

listen 80;

server_name www.MYDOMAIN.com;

access_log /home/MYUSER/public_html/MYDOMAIN.com/log/access.log;

error_log /home/MYUSER/public_html/MYDOMAIN.com/log/error.log;

location / {

root /home/MYUSER/public_html/MYDOMAIN.com/public/;

index index.php index.html;
#File included below points to my wordpress rewrite rules
include /home/MYUSER/public_html/nginx/MYDOMAIN/wordpress.conf;
}

# 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/MYUSER/public_html/MYDOMAIN.com/public/$fastcgi_script_name;
}

}
Re: Help please :( Multiple Domains on 1 IP Address
February 12, 2011 04:11AM
Update: I figured it out. Thanks anyway for your help.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready