ericovk
Verified User
We are running a Apache/Nginx combination pretty much out of the box. When I try to install Magento 2, I have to rename the public_html folder to pub. Therefore I added this rule to the "Custom4" field in HTTPD customizations at the admin level.
DA says the syntax is okay, but on restart of Nginx, it won't start due to a misconfiguration.
After commenting the DocumentRoot rules manually, Nginx starts, but of course the changes I made are gone.
How can I set up this DocumentRoot folder properly at /pub in stead of /public_html?
Code:
DocumentRoot /home/username/domains/domain.com/pub
DA says the syntax is okay, but on restart of Nginx, it won't start due to a misconfiguration.
Code:
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-04-20 14:06:29 CEST; 4s ago
Process: 2004 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Apr 20 14:06:29 servername systemd[1]: Starting The nginx HTTP and reverse proxy server...
Apr 20 14:06:29 servername nginx[2004]: nginx: [emerg] unexpected "}" in /usr/local/directadmin/data/users/username/nginx.conf:39
Apr 20 14:06:29 servername nginx[2004]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 20 14:06:29 servername systemd[1]: nginx.service: control process exited, code=exited status=1
Apr 20 14:06:29 servername systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Apr 20 14:06:29 servername systemd[1]: Unit nginx.service entered failed state.
Apr 20 14:06:29 servername systemd[1]: nginx.service failed.
After commenting the DocumentRoot rules manually, Nginx starts, but of course the changes I made are gone.
How can I set up this DocumentRoot folder properly at /pub in stead of /public_html?