You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#save as file: /etc/nginx/conf.d/domain.conf
server {
client_max_body_size 40M;
listen 443 ssl;
server_name www.domain.com domain.com; #change to your domain name
ssl on;
ssl_certificate /etc/ssl/cacert.pem; #this needs to be the path to your certificate information
ssl_certificate_key /etc/ssl/privkey.pem; #this needs to be the path to your certificate information
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass https://10.0.0.2:443; #change to your internal server IP
proxy_redirect off;
}
}
server {
client_max_body_size 40M;
listen 80;
server_name www.domain.com domain.com; #change to your domain name
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://10.0.0.2:80; #change to your internal server IP
proxy_redirect off;
}
}
// You can see what is current allowed like this
semanage port -l | egrep '(^http_port_t)'
// modify port
semanage port -m -t http_port_t -p tcp 4567
// add port
semanage port -a -t http_port_t -p tcp 8040
// 403 error
semanage fcontext -a -t httpd_sys_content_t "/wwwroot(/.*)?"
restorecon -Rv /wwwroot