Welcome! Log In Create A New Profile

Advanced

How to install a nginx-only domain in a server running Vesta (apache + nginx)?

Posted by geropellicer 
How to install a nginx-only domain in a server running Vesta (apache + nginx)?
September 10, 2019 02:31PM
Hi I have a Cloud Server in a local hosting company with Ubuntu Server 18.04 installed. I've already successfully installed Vesta Control Panel with these settings:

Web: nginx + apache
FTP: vsftpd
Mail: exim + dovecot + spamassasin + clamav
DNS: named
Firewall: iptables + fail2ban
Softaculous: Yes
DB: MySql + PostreSQL
I succesfully added three domains via Vesta CP user interface and configured them properly. I used this setup because these three sites use Wordpress, so installing wordpress solely with nginx is quite complicated, but using apache + nginx works pretty well.

Now I want to know if I can install another domain/site that does work only in nginx, because I then need to configure guinorn to run a Python/Django web app (ass opossed to the other 3 domains where I use wordpress).

I tried this steps: went to /etc/nginx/conf.d and added a mydomain.com.conf file with these settings:

server {
listen 80;
listen [::]:80;

root /var/www/gero.com.ar/public_html;

index index.html;

server_name gero.com.ar www.gero.com.ar;

access_log /var/log/nginx/gero.com.ar.access.log;
error_log /var/log/nginx/gero.com.ar.error.log;

location / {
try_files $uri $uri/ =404;
}
}


Then restarted both nginx and apache services, but it didn't work. When I enter gero.com.ar, it goes to the vesta default domain.

Is there a way to do this? Do you know any tutorials/guides that accomplish something different?

In case the text is unclear or my approach is not correct: What I want to accomplish one way or the other is to have 4 domains in my server. One running a django app and the other three running wordpress. I already did the wordpress part, trying to figure out the django part now.

Thanks in advance
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 235
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