Questions tagged [nginx-config]
2020 questions
0
votes
1 answer
Nginx Configuration for Wordpress AND Laravel Application
I'm trying to get my Wordpress blog hosted on blog.domain.com to work on domain.com/blog.
I have been able to do this with proxy_pass successfully but the issue is certain scripts such as the login page for admins (/wp-login.php) does not work - it…

Tim Rowley
- 420
- 4
- 15
0
votes
0 answers
How to hide ".py" ".cgi" ".pl" in my URLs?
I have Nginx server up and running, I am trying to host a CGI script, so, it is hosted at
https://sub.domain.com/index.cgi
instead, I want it like
https://sub.domain.com/
Here is my current Nginx Config:
server {
listen 80;
server_name …
0
votes
1 answer
S3 virtual-host style nginx configuration for subdomains
I am trying to get a min.io server up and running with virtual-host style and am failing to configure nginx to do so correctly.
Expected result
bucket.s3.domain.com works to access bucket
Actual result
bucket.s3.domain.com is redirected to…

unknown_horse
- 11
- 4
0
votes
0 answers
nginx redirection from HTTPS to HTTP
I have a WireMock application running locally and exposed to http. And, I am able to access the wiremock server at http://localhost:8090/user/test
I am trying to use nginx to redirect https CLIENT call to backend wiremock http i.e.…
0
votes
0 answers
Nginx https wildcard subdomains to https www
I want to redirect https://*.example.com to https://www.example.com (* being any subdomain).
My Nginx configuration (unrelated lines removed):
server {
server_name www.example.com;
location = /favicon.ico { access_log off; log_not_found…

Ulvi
- 965
- 12
- 31
0
votes
0 answers
Connect a docker container to another docker container with nginx
I currently have a VueJS application that has 2 parts. One being a static front end page and the other as a NodeJS express backend.
In the backend server, it will load the static(dist) folder as the front end view. The backend also contains some…

Bryll Delfin
- 13
- 3
0
votes
1 answer
How to edit url without updating in browser - nginx config
I want the Request URL to be converted from
http://host.com/newname/abc?def= to
http://newname/abc?def=
here is the config file
server {
listen 80;
server_name
host.com
location / {
rewrite ^(.+)/$ $1 permanent;
rewrite…

salih
- 324
- 1
- 7
- 14
0
votes
0 answers
NGINX: How to correctly use an IF statement to include a proxy_pass
I am trying to use an IF statement in the location context inside my nginx.conf to add a proxy_pass element if the application is started up as being in local mode
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
…

deadtoy
- 43
- 4
0
votes
1 answer
Nginx - pass proxy_cache value with proxy_cache_bypass
I have multiple proxy_cache_path directives and in the http block and I want to pass the value of the proxy_cache variable to a lua modul. However, I do not want to define the route (/tmp/cache/BackendA or /tmp/cache/BackendB, etc) more than once. I…

Milky
- 143
- 4
- 15
0
votes
0 answers
Disable directory access other than server block
My nginx server block
server {
listen 80;
root /var/www/html/blog;
index index.php index.html index.htm;
server running wordpress. I want to limit PHP to access /var/www/html/blog only. Request to access other directory like /var/www/html/web…

Zils
- 403
- 2
- 4
- 19
0
votes
1 answer
NGINX Reverse Proxy Configuration Structure
Is there a "proper" structure for the directives of an NGINX Reverse Proxy? I have seen 2 main differences when looking for examples of an NGINX reverse proxy.
http directive is used to house all server directives. Servers with data are listed in a…

Torc
- 1,148
- 6
- 20
- 43
0
votes
0 answers
Set nginx module on off based on condition
I have an nginx config for which I need to enable ssi on or off based on a condition.
I have tried moving ssi inside an if condition but nginx doesn't allow that.
location / {
if(condition) {
ssi on;
}
}
I then tried setting on…

javaDeveloper
- 1,403
- 3
- 28
- 42
0
votes
1 answer
ERR_CONNECTION_RESET for only javascript files
I have a simple static webpage (HTML CSS JS) hosted on a DigitalOcean droplet using nginx. Everything worked as expected until last night when it the javascript files stopped being served. When I access the website, the HTML and CSS files load fine,…

fakebear
- 1
- 1
0
votes
1 answer
How should I set up a reverse proxy with nginx?
I must configure a reverse proxy with nginx installed on the machine, to redirect the connections to the Docker containers. Is there a problem if my reverse proxy is also a container instead of physically installing on the machine? Which form is the…

Lucas Lima
- 121
- 6
0
votes
1 answer
How do i redirect WWW url to non www url in nginx?
I have an issue with my nginx configuration , i want to redirect www.yoursay.transport.nsw.gov.au to https://yoursay.transport.nsw.gov.au
Here is my configuration
server {
listen 443 ssl;
ssl_certificate…

sambit
- 339
- 4
- 12