iup
This commit is contained in:
1 parent
b5a619ce8c
commit
e6fd9b5da8
2 files changed
+49
-65
No files matched your search
@@ -0,0 +1,48 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name tickets.noc.1nfo.services;
|
||||||
|
rewrite ^ https://tickets.mydomain.com permanent;
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
listen 443;
|
||||||
|
server_name tickets.1nfo.services;
|
||||||
|
ssl on;
|
||||||
|
ssl_certificate /etc/nginx/certs/cert.pem;
|
||||||
|
ssl_certificate_key /etc/nginx/certs/cert.key;
|
||||||
|
keepalive_timeout 70;
|
||||||
|
root /var/www/osticket;
|
||||||
|
set \$path_info "";
|
||||||
|
location ~ /include {
|
||||||
|
deny all;
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
if (\$request_uri ~ "^/api(/[^\?]+)") {
|
||||||
|
set \$path_info \$1;
|
||||||
|
}
|
||||||
|
location ~ ^/api/(?:tickets|tasks).*$ {
|
||||||
|
try_files \$uri \$uri/ /api/http.php?\$query_string;
|
||||||
|
}
|
||||||
|
if (\$request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
|
||||||
|
set \$path_info \$1;
|
||||||
|
}
|
||||||
|
if (\$request_uri ~ "^/.*\.php(/[^\?]+)") {
|
||||||
|
set \$path_info \$1;
|
||||||
|
}
|
||||||
|
location ~ ^/scp/ajax.php/.*$ {
|
||||||
|
try_files \$uri \$uri/ /scp/ajax.php?\$query_string;
|
||||||
|
}
|
||||||
|
location ~ ^/ajax.php/.*$ {
|
||||||
|
try_files \$uri \$uri/ /ajax.php?\$query_string;
|
||||||
|
}
|
||||||
|
location / {
|
||||||
|
try_files \$uri \$uri/ index.php;
|
||||||
|
}
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files \$uri = 404;
|
||||||
|
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param PATH_INFO \$path_info;
|
||||||
|
fastcgi_pass 127.0.0.1:8888;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+1
-65
@@ -20,71 +20,7 @@ cd ~
|
|||||||
dnf -y in php php-mysqli php-gd php-gettext php-json php-mbstring php-xml php-pecl-apcu mariadb-server mariadb nginx php-fpm git && \
|
dnf -y in php php-mysqli php-gd php-gettext php-json php-mbstring php-xml php-pecl-apcu mariadb-server mariadb nginx php-fpm git && \
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
cat << EOF > /etc/nginx/conf.d/osticket
|
cp nginx-conf/osticket.conf /etc/nginx/conf.d/. && \
|
||||||
# Rewrite all requests from HTTP to HTTPS
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name tickets.noc.1nfo.services;
|
|
||||||
rewrite ^ https://tickets.mydomain.com permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 443;
|
|
||||||
server_name tickets.1nfo.services;
|
|
||||||
ssl on;
|
|
||||||
ssl_certificate /etc/nginx/certs/cert.pem;
|
|
||||||
ssl_certificate_key /etc/nginx/certs/cert.key;
|
|
||||||
|
|
||||||
keepalive_timeout 70;
|
|
||||||
|
|
||||||
root /var/www/osticket;
|
|
||||||
|
|
||||||
set \$path_info "";
|
|
||||||
|
|
||||||
location ~ /include {
|
|
||||||
deny all;
|
|
||||||
return 403;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (\$request_uri ~ "^/api(/[^\?]+)") {
|
|
||||||
set \$path_info \$1;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ ^/api/(?:tickets|tasks).*$ {
|
|
||||||
try_files \$uri \$uri/ /api/http.php?\$query_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (\$request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
|
|
||||||
set \$path_info \$1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (\$request_uri ~ "^/.*\.php(/[^\?]+)") {
|
|
||||||
set \$path_info \$1;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ ^/scp/ajax.php/.*$ {
|
|
||||||
try_files \$uri \$uri/ /scp/ajax.php?\$query_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ ^/ajax.php/.*$ {
|
|
||||||
try_files \$uri \$uri/ /ajax.php?\$query_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
try_files \$uri \$uri/ index.php;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
try_files \$uri = 404;
|
|
||||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
|
||||||
include fastcgi_params;
|
|
||||||
fastcgi_param PATH_INFO \$path_info;
|
|
||||||
fastcgi_pass 127.0.0.1:8888;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EOF && \
|
|
||||||
\
|
\
|
||||||
\
|
\
|
||||||
systemctl enable --now mariadb && \
|
systemctl enable --now mariadb && \
|
||||||
|
|||||||
Reference in new issue
Block a user