I want to configure nginx with an additional vhost.
I added an A-record for a subdomain to the DNS configuration. The IP is equal to the box’ IP. Then I added a file example.conf to /etc/nginx/sites-enabled with content:
However, when I try to visit example.mydomain.net, I get redirected to Roundcube. Only when I uncomment include /etc/nginx/conf.d/*.conf; in nginx.conf (so not include the configuration generated by MIAB) does the vhost work properly.
Does anyone know why this is? Or how to get it to work while still including the MIAB nginx configuration?
You do not configure Nginx in this manner with MiaB. So undo everything that you have done. Everything.
Now, add a user or alias with an email address in the format of user@example.mydomain.net
Then go to the web tab in the admin area, where your sub-domain is listed, click on the ‘change’ box. Follow the instructions by adding the new directory on the server, then click the update button.
Viola! Done.
Because Nginx is configured to pick up the server blocks in a different location in MiaB. I will look later to see exactly where the location is, but do not have time atm.
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
It should process both locations. In fact, when I uncomment the first line, the additional vhost does work. So I wonder what is in the conf.d that prevents the configuration files in sites-enabled to be processed.
I wonder if I can run PHP app on the additional vhost and then change path to my folder?
I have installed mailinabox at box. inoxphuongdiep.com, then I want to run https:// cypht .org/ at app. inoxphuongdiep.com?