Updated nginx Templates for Better Matches / Alias

This commit is contained in:
earnolmartin 2023-07-12 23:49:10 -06:00
parent dbd7a224f8
commit 50c92f1ff1
8 changed files with 305 additions and 76 deletions

View file

@ -37,7 +37,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
@ -59,11 +59,7 @@ server {
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -82,12 +78,8 @@ server {
root {ehcpdir}/;
}
}
location /webmail {
rewrite ^/* /roundcube last;
}
location /ehcp {
location /ehcp/ {
root /var/www/new/;
index index.php index.html index.htm;
@ -123,7 +115,7 @@ server {
}
}
location /roundcube {
location /roundcube/ {
root /usr/share/;
index index.php index.html index.htm;
@ -147,6 +139,32 @@ server {
auth_basic off;
allow all; # Allow all to see content
}
# Alias Section
location = /ehcp {
return 301 /ehcp/;
}
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
# any files that should be avoided, may be put here:
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {

View file

@ -42,7 +42,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
@ -66,7 +66,7 @@ server {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -86,11 +86,11 @@ server {
}
}
location /webmail {
location /webmail/ {
rewrite ^/* /roundcube last;
}
location /roundcube {
location /roundcube/ {
root /usr/share/;
index index.php index.html index.htm;
@ -109,6 +109,46 @@ server {
root /usr/share/;
}
}
location /extplorer/ {
root {ehcpdir}/;
index index.php index.html index.htm;
location ~ ^/extplorer/(.+\.php)$ {
try_files $uri =404;
root {ehcpdir}/;
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
include /etc/nginx/fastcgi_params;
limit_req zone=one burst=5;
}
}
location /webmail2 {
return 301 /webmail2/;
}
location /webmail {
return 301 /roundcube/;
}
location /roundcube {
return 301 /roundcube/;
}
location /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
location = /extplorer {
return 301 /extplorer/;
}
}
# END OF CUSTOM GLOBAL PANEL URLS Template

View file

@ -37,7 +37,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
@ -57,11 +57,7 @@ server {
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
location ~ ^/webmail2/(.+\.php)$ {
@ -80,11 +76,11 @@ server {
}
}
location /webmail {
location /webmail/ {
rewrite ^/* /roundcube last;
}
location /ehcp {
location /ehcp/ {
root /var/www/new/;
index index.php index.html index.htm;
location ~ ^/ehcp/(.+\.php)$ {
@ -119,7 +115,7 @@ server {
}
}
location /roundcube {
location /roundcube/ {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/roundcube/(.+\.php)$ {
@ -141,6 +137,32 @@ server {
auth_basic off;
allow all; # Allow all to see content
}
# Alias Section
location = /ehcp {
return 301 /ehcp/;
}
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
# any files that should be avoided, may be put here:
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {

View file

@ -42,7 +42,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
@ -62,11 +62,8 @@ server {
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -110,7 +107,7 @@ server {
}
}
location /extplorer {
location /extplorer/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -125,6 +122,32 @@ server {
limit_req zone=one burst=5;
}
}
# Alias
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
location = /extplorer {
return 301 /extplorer/;
}
}
# END OF CUSTOM GLOBAL PANEL URLS Template

View file

@ -37,7 +37,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
@ -59,11 +59,7 @@ server {
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -83,11 +79,11 @@ server {
}
}
location /webmail {
location /webmail/ {
rewrite ^/* /roundcube last;
}
location /ehcp {
location /ehcp/ {
root /var/www/new/;
index index.php index.html index.htm;
@ -123,7 +119,7 @@ server {
}
}
location /roundcube {
location /roundcube/ {
root /usr/share/;
index index.php index.html index.htm;
@ -147,6 +143,32 @@ server {
auth_basic off;
allow all; # Allow all to see content
}
# Alias Section
location = /ehcp {
return 301 /ehcp/;
}
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
# any files that should be avoided, may be put here:
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
@ -200,7 +222,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
@ -222,11 +244,7 @@ server {
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -246,11 +264,11 @@ server {
}
}
location /webmail {
location /webmail/ {
rewrite ^/* /roundcube last;
}
location /ehcp {
location /ehcp/ {
root /var/www/new/;
index index.php index.html index.htm;
@ -286,7 +304,7 @@ server {
}
}
location /roundcube {
location /roundcube/ {
root /usr/share/;
index index.php index.html index.htm;
@ -310,6 +328,32 @@ server {
auth_basic off;
allow all; # Allow all to see content
}
# Alias Section
location = /ehcp {
return 301 /ehcp/;
}
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
# any files that should be avoided, may be put here:
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {

View file

@ -57,7 +57,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
@ -76,12 +76,8 @@ server {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -101,7 +97,7 @@ server {
}
}
location /webmail {
location /webmail/ {
rewrite ^/* /roundcube last;
}
@ -125,7 +121,7 @@ server {
}
}
location /extplorer {
location /extplorer/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -140,6 +136,48 @@ server {
limit_req zone=one burst=5;
}
}
location /extplorer/ {
root {ehcpdir}/;
index index.php index.html index.htm;
location ~ ^/extplorer/(.+\.php)$ {
try_files $uri =404;
root {ehcpdir}/;
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
include /etc/nginx/fastcgi_params;
limit_req zone=one burst=5;
}
}
# Alias
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
location = /extplorer {
return 301 /extplorer/;
}
}
### END OF CUSTOM GLOBAL PANEL URLS Template ###

View file

@ -44,7 +44,7 @@ server {
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
@ -66,11 +66,7 @@ server {
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -90,11 +86,11 @@ server {
}
}
location /webmail {
location /webmail/ {
rewrite ^/* /roundcube last;
}
location /ehcp {
location /ehcp/ {
root /var/www/new/;
index index.php index.html index.htm;
@ -130,7 +126,7 @@ server {
}
}
location /roundcube {
location /roundcube/ {
root /usr/share/;
index index.php index.html index.htm;
@ -154,6 +150,32 @@ server {
auth_basic off;
allow all; # Allow all to see content
}
# Alias Section
location = /ehcp {
return 301 /ehcp/;
}
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
# any files that should be avoided, may be put here:
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {

View file

@ -47,7 +47,7 @@ server {
limit_req zone=one burst=5;
}
location /phpmyadmin {
location /phpmyadmin/ {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
@ -66,12 +66,8 @@ server {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location /webmail2 {
location /webmail2/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -91,11 +87,11 @@ server {
}
}
location /webmail {
location /webmail/ {
rewrite ^/* /roundcube last;
}
location /roundcube {
location /roundcube/ {
root /usr/share/;
index index.php index.html index.htm;
@ -115,7 +111,7 @@ server {
}
}
location /extplorer {
location /extplorer/ {
root {ehcpdir}/;
index index.php index.html index.htm;
@ -130,6 +126,32 @@ server {
limit_req zone=one burst=5;
}
}
# Alias
location = /webmail2 {
return 301 /webmail2/;
}
location = /webmail {
return 301 /roundcube/;
}
location = /roundcube {
return 301 /roundcube/;
}
location = /phpMyAdmin {
return 301 /phpmyadmin/;
}
location = /phpmyadmin {
return 301 /phpmyadmin/;
}
location = /extplorer {
return 301 /extplorer/;
}
}
# END OF CUSTOM GLOBAL PANEL URLS Template