ajenti-v
ajenti-v copied to clipboard
Two websites, two domains, one server
Ubuntu 14.04 Ajenti-V
So I have two websites that I've created and set up within /srv/ lets call one '/something/' and the other one '/somthingelse/'. Now I own the domain 'something.com' and 'somethingelse.com' but I can only get the first one to show up correctly. Both are running off of port 80 and domains are entered repsectivley but I dont know what wrong.
/something/ is set to 'something.com' domain and to host '@' on port 80 /somethingelse/ is set to 'somethingelse.com' domain to host '@' on port 80
paste your vhost files /etc/nginx/conf.d/* here
''' server { listen *:80;
server_name postichproducts.com;
access_log /var/log/nginx/postich.access.log;
error_log /var/log/nginx/postich.error.log;
root /srv/postich;
index index.html index.htm index.php;
location ~ [^/]\.php(/|$) {
fastcgi_index index.php;
include fcgi.conf;
fastcgi_pass unix:/var/run/ajenti-v-php-fcgi-postich-php-fcgi-0.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
} '''
and
''' server { listen *:4322;
access_log /var/log/nginx/vics.access.log;
error_log /var/log/nginx/vics.error.log;
root /srv/vics;
index index.html index.htm index.php;
location ~ [^/]\.php(/|$) {
fastcgi_index index.php;
include fcgi.conf;
fastcgi_pass unix:/var/run/ajenti-v-php-fcgi-vics-php-fcgi-0.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
'''
Right now it is configured so that my main site runs through port 80 and works best with GoDaddy's DNS settings and the second site is running on port 4322 and using forward masking which I am not happy about at all
where's the server_name directive in the second vhost?
server { listen *:4322;
server_name vicspizzaoncoffee.com;
access_log /var/log/nginx/vics.access.log;
error_log /var/log/nginx/vics.error.log;
root /srv/vics;
index index.html index.htm index.php;
location ~ [^/]\.php(/|$) {
fastcgi_index index.php;
include fcgi.conf;
fastcgi_pass unix:/var/run/ajenti-v-php-fcgi-vics-php-fcgi-0.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
If you set both to port 80, what happens when you visit the second domain?
First domain works but the second one wont load
Do you get an error? Does it just hang? Specificity goes a long way.
No its like its not even finding it. Doesn't even attempt to load anything because I don't think it's configured right. I have both hosts set to * along with both GoDaddy domains hosts set *. Is it possible to change hosts to specific names (like can I use any host name I want?) so I could set server1 to host "postich" and point godaddys DNS to postich on port 80?
I dont know how well formed this question is I am still trying to learn this as I go.
On Wed, Feb 11, 2015 at 9:14 PM, Nick Teeple [email protected] wrote:
Do you get an error? Does it just hang? Specificity goes a long way.
— Reply to this email directly or view it on GitHub https://github.com/Eugeny/ajenti-v/issues/141#issuecomment-74005666.
Another update: If I set a subdomain using GoDaddys directions: https://support.godaddy.com/help/article/4080/managing-a-domain-names-subdomains
and set the second site to the host "vics" as well as added the subdomain host "vics" to godaddy.
server {
listen *:80;
server_name postichproducts.com;
access_log /var/log/nginx/postich.access.log;
error_log /var/log/nginx/postich.error.log;
root /srv/postich;
index index.html index.htm index.php;
location ~ [^/]\.php(/|$) {
fastcgi_index index.php;
include fcgi.conf;
fastcgi_pass
unix:/var/run/ajenti-v-php-fcgi-postich-php-fcgi-0.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
server {
listen vics:80;
server_name vicspizzaoncoffee.com;
access_log /var/log/nginx/vics.access.log;
error_log /var/log/nginx/vics.error.log;
root /srv/vics;
index index.html index.htm index.php;
location ~ [^/]\.php(/|$) {
fastcgi_index index.php;
include fcgi.conf;
fastcgi_pass unix:/var/run/ajenti-v-php-fcgi-vics-php-fcgi-0.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
and now when I load vics.postichproducts.com still only the postichproducts main site loads
On Thu, Feb 12, 2015 at 8:42 AM, Jack Postich [email protected] wrote:
No its like its not even finding it. Doesn't even attempt to load anything because I don't think it's configured right. I have both hosts set to * along with both GoDaddy domains hosts set *. Is it possible to change hosts to specific names (like can I use any host name I want?) so I could set server1 to host "postich" and point godaddys DNS to postich on port 80?
I dont know how well formed this question is I am still trying to learn this as I go.
On Wed, Feb 11, 2015 at 9:14 PM, Nick Teeple [email protected] wrote:
Do you get an error? Does it just hang? Specificity goes a long way.
— Reply to this email directly or view it on GitHub https://github.com/Eugeny/ajenti-v/issues/141#issuecomment-74005666.
I also now have this on my gnix config nginx: [emerg] host not found in "vics:80" of the "listen" directive in /etc/nginx/conf.d/vics.conf:7 nginx: configuration file /etc/nginx/nginx.conf test failed
On Thu, Feb 12, 2015 at 8:56 AM, Jack Postich [email protected] wrote:
Another update: If I set a subdomain using GoDaddys directions: https://support.godaddy.com/help/article/4080/managing-a-domain-names-subdomains
and set the second site to the host "vics" as well as added the subdomain host "vics" to godaddy.
server { listen *:80; server_name postichproducts.com; access_log /var/log/nginx/postich.access.log; error_log /var/log/nginx/postich.error.log; root /srv/postich; index index.html index.htm index.php; location ~ [^/]\.php(/|$) { fastcgi_index index.php; include fcgi.conf; fastcgi_pass
unix:/var/run/ajenti-v-php-fcgi-postich-php-fcgi-0.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} } server { listen vics:80; server_name vicspizzaoncoffee.com; access_log /var/log/nginx/vics.access.log; error_log /var/log/nginx/vics.error.log; root /srv/vics; index index.html index.htm index.php; location ~ [^/]\.php(/|$) { fastcgi_index index.php; include fcgi.conf; fastcgi_pass unix:/var/run/ajenti-v-php-fcgi-vics-php-fcgi-0.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }
and now when I load vics.postichproducts.com still only the postichproducts main site loads
On Thu, Feb 12, 2015 at 8:42 AM, Jack Postich [email protected] wrote:
No its like its not even finding it. Doesn't even attempt to load anything because I don't think it's configured right. I have both hosts set to * along with both GoDaddy domains hosts set *. Is it possible to change hosts to specific names (like can I use any host name I want?) so I could set server1 to host "postich" and point godaddys DNS to postich on port 80?
I dont know how well formed this question is I am still trying to learn this as I go.
On Wed, Feb 11, 2015 at 9:14 PM, Nick Teeple [email protected] wrote:
Do you get an error? Does it just hang? Specificity goes a long way.
— Reply to this email directly or view it on GitHub https://github.com/Eugeny/ajenti-v/issues/141#issuecomment-74005666.
@4thearth Did you ever get this sorted out?
@brianking yes but this was a while ago I think I had to add lines to the hosts file of Ubuntu then set the hosts in ajenti to BOTH *:80 and (hostname):80 on both websites