- Edited
So I added a default (Or so I thought) Config for osticket nginx, but when I try to connect I get 403 forbidden, attached is a copy of my config. Mind helping a poor young newb?
So I added a default (Or so I thought) Config for osticket nginx, but when I try to connect I get 403 forbidden, attached is a copy of my config. Mind helping a poor young newb?
Nvm, won't let me upload a txt, here is a link. :) https://docs.google.com/document/d/1lHdLKCLcKnjWlctF_C3o9agP1i6R2NToy-GUUtW0Mp0/edit?usp=sharing
Nginx is NOT supported officially.Despite, some forum members here run it successfully, but as far as I remember it requires some tweaking of the config that it runs smoothly. So, I'd try to search the forum (and the web) for a working nginx config or switch to a supported webserver software, e.g. apache or IIS.
I have attempted to find one, and I did have a nginx config, but I received the same error when using it.
http://wiki.nginx.org/OSTicket
So I then tried to get it up and running via a regular wordpress config, which didn't work either.
:)
I just finished with a new Osticket install on a vesta control panel (open source), which natively supports Nginx and apache.I installed wordpress on a subdirectory, e.g. : www/wordpressand installed osticket also on a subdirectory , e.g: www/osticketThe default nginx.conf filehttps://gist.github.com/tdawg852/4a01d51c8160a29f0552The nginx.conf per websitehttps://gist.github.com/tdawg852/7f8eb11d2ae9288179cdThese are default settings vesta control panel created that i havn't tweaked yet except in the second file were i specified the root folder of my wordpress install.Hope this helps.
You might want to take a look at the nginx threads over at github also.https://github.com/osTicket/osTicket-1.8/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+nginx
For others: I have a working NGINX osTicket at present. Mine is SSL but most settings can be moved to non-ssl version if that's what you're using.
domain.conf file
server {
listen 80;
server_name helpdesk.compumatter.biz;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name helpdesk.compumatter.biz;
ssl on;
ssl_certificate /etc/letsencrypt/live/compumatter.biz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/compumatter.biz/privkey.pem; # managed by Certbot
# no trailing slash
root /SM/data-drive/smw_helpdesk/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
client_max_body_size 2000M;
client_body_buffer_size 100M;
client_header_buffer_size 10M;
large_client_header_buffers 2 10M;
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
send_timeout 10;
gzip on;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/x-javascript text/xml text/css application/xml;
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;
}
location ~ ^/scp/ajax.php/.*$ {
try_files $uri $uri/ /scp/ajax.php?$query_string;
}
location / {
try_files $uri $uri/ index.php;
}
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_param PATH_INFO $path_info;
}
}
Hi, @compumatter... is this configuration still valid for use with OST 1.18.1?
Hi, I'm using osticket 18.1, I followed the nginx config above and https is running and the web can also appear, but I'm having a problem that the agent user access that I usually use is rejected, if I return to the http config the access is successful, is there any solution for this?
# HTTP
server {
listen 80;
server_name mydomain.com;
return 301 https://$server_name$request_uri;
}
#HTTPS
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name mydomain.com;
# SSL
ssl_certificate /etc/ssl/myssl.crt;
ssl_certificate_key /etc/ssl/myssl.key;
# Directory osticket
root /var/www/html/intix;
# Loging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Config osticket
index index.php index.html;
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;
}
location ~ ^/scp/ajax.php/.*$ {
try_files $uri $uri/ /scp/ajax.php?$query_string;
}
location / {
try_files $uri $uri/ index.php;
}
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_param PATH_INFO $path_info;
}
}
You would need to start your own discussion with as much information as possible, steps you are doing, and a screenshot of Admin Panel > Dashboard > Information.
Cheers.