04-14-2023, 10:13 PM
Question (shortened): How can I set nginx as default and make sure it works, not apache,
<strong>Short Answer:</strong>
The short, easy, practical way: ehcp gui -> options -> advanced -> select nginx, submit
if you do not do this, the default server of apache will be invoked in some intervals by ehcp.
<strong>Related Info:</strong>
A less known feature of ehcp is its nginx integration,
and ehcp is known to be first and only opensource hosting control panel that supports nginx directly.
Ehcp installs & configures apache & nginx while installing ehcp itself. Server admin may choose to operate on one of these web servers through ehcp gui.
ehcp installs both apache & nginx, but only one is active at a moment.
apache is default now, but server admin may set nginx as described above.
ehcp tries to configure & run nginx, then, if something goes wrong, apache is used as a fallback.
If, somehow, your server switch backs to apache, althaugh you set nginx in advanved options, then, there is something wrong in your nginx configuration. Let me know, I will explain more. You may even disable apache start code inside ehcp php code.
To set some configuration for all domains, for nginx,
edit following files:
ehcp/etc/nginx/apachetemplate.nginx
ehcp/apachetemplate
(actually the second one is used, but first is copied over second on webserver switch, as above) **
after editing, ehcp gui -> options -> sync domains
To allow/deny for some Ip, put related nginx config in these files,
You may also do this on per-domain basis like this: ehcp gui -> choose domain -> click "edit apachetemplate" (link name is confusing here, I will fix it later)
in this case, only configuration for that domain is changed.
for nginx ip denying, http://nginx.org/en/docs/http/ngx_http_access_module.html
<strong>Non-Domain configurations</strong>
above file & per-domain settings only affects domain's configurations.
To change for example, http://{serverIP}/ehcp , (that is, not domain)
you should change & sync following files:
ehcp/etc/nginx/default.nginx
/etc/nginx/sites-enabled/default
two files operates similar to description above (**)
All files in ehcp/etc are used to copy onto their counterparts in linux/ubuntu system, so, changing them according to your needs may fix some of your needs.
some file namings are confusing, like ehcp/etc/nginx/apachetemplate.nginx (as a natural result of apache-to-multi webserver transition in ehcp)
if you have more questions, let us know.
Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
<strong>Short Answer:</strong>
The short, easy, practical way: ehcp gui -> options -> advanced -> select nginx, submit
if you do not do this, the default server of apache will be invoked in some intervals by ehcp.
<strong>Related Info:</strong>
A less known feature of ehcp is its nginx integration,
and ehcp is known to be first and only opensource hosting control panel that supports nginx directly.
Ehcp installs & configures apache & nginx while installing ehcp itself. Server admin may choose to operate on one of these web servers through ehcp gui.
ehcp installs both apache & nginx, but only one is active at a moment.
apache is default now, but server admin may set nginx as described above.
ehcp tries to configure & run nginx, then, if something goes wrong, apache is used as a fallback.
If, somehow, your server switch backs to apache, althaugh you set nginx in advanved options, then, there is something wrong in your nginx configuration. Let me know, I will explain more. You may even disable apache start code inside ehcp php code.
To set some configuration for all domains, for nginx,
edit following files:
ehcp/etc/nginx/apachetemplate.nginx
ehcp/apachetemplate
(actually the second one is used, but first is copied over second on webserver switch, as above) **
after editing, ehcp gui -> options -> sync domains
To allow/deny for some Ip, put related nginx config in these files,
You may also do this on per-domain basis like this: ehcp gui -> choose domain -> click "edit apachetemplate" (link name is confusing here, I will fix it later)
in this case, only configuration for that domain is changed.
for nginx ip denying, http://nginx.org/en/docs/http/ngx_http_access_module.html
<strong>Non-Domain configurations</strong>
above file & per-domain settings only affects domain's configurations.
To change for example, http://{serverIP}/ehcp , (that is, not domain)
you should change & sync following files:
ehcp/etc/nginx/default.nginx
/etc/nginx/sites-enabled/default
two files operates similar to description above (**)
All files in ehcp/etc are used to copy onto their counterparts in linux/ubuntu system, so, changing them according to your needs may fix some of your needs.
some file namings are confusing, like ehcp/etc/nginx/apachetemplate.nginx (as a natural result of apache-to-multi webserver transition in ehcp)
if you have more questions, let us know.
Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.