So, finally I stop working with free VPSs, and start using Vultr. Not a huge improvement… baby steps…
So, I’d like to install a Wordpress in the same VPS, but can’t configure the nginx to see the port.
ERPNext with lets encrypt, with ports 80 and 443 settled.
Installed Wordpress using the same structure, considering that Wordpress uses other directories
Config in the /etc/nginx/sites-enabled:
On my server, I have apache running on port 80. This is through a standard LAMP installation. This contains a few sites, including some running wordpress. Port 80 and 443 are therefore reserved for sites hosted by apache.
When I set up ERPNext, it set up on port 8800.
If you want to insist on using ErpNext on port 80, then I suggest the following.
Create a site using apache
Set up ErpNext to run on a different port (for example 8000)
On the site root, create an .htaccess file with redirect all requests to port 80 of the site, to the other site (with port 8000)
Installing ERPNext configures Nginx to look for configs in /etc/nginx/conf.d/ rather than /etc/nginx/sites-enabled. See the last line in etc/nginx/nginx.conf
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=web-cache:8m max_size=1000m inactive=600m;
include /etc/nginx/conf.d/*.conf;
}
So simply put your site configuration files in the /etc/nginx/conf.d/ directory, and ensure they end with .conf or allow other extensions in /etc/nginx/nginx.conf like so:
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=web-cache:8m max_size=1000m inactive=600m;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/conf.d/*.com; #this will include all .com site configs