Questions tagged [nginx-config]
2020 questions
0
votes
0 answers
nginx gives me error when I change public IPv4 address to DNS
I am setting up my ec2 machine on AWS and when I change server_name from x.xxx.xx.xxx to ec2-x-xxx-xx-xxx.eu-central-1.compute.amazonaws.com, and run
sudo service nginx restart
it gives me
Job for nginx.service failed because the control process…

bd_28
- 125
- 10
0
votes
0 answers
Setup SSL Certificate for multiple ports using 1 domain name
I need to setup ssl for 2 websites: admin and client, with the same domain abc.example.com but different port.
The admin page, you need to setup:
http: 8080
https: 8443
root /var/www/admin/public
server {
listen 8080;
server_name…

Nguyen Hung
- 127
- 2
- 10
0
votes
0 answers
nginx: nginx: [emerg] "upstream" directive is not allowed here in /etc/nginx/sites-enabled/www.example.com.conf
Please, can anyone help me? I'm having to do a load balance on a reverse proxy server, which was not configured by me.
And when I configure the upstream directive it is giving an error. I have already tried to set it within http {} and within the…

Catulo Hansen
- 1
- 1
0
votes
1 answer
make endpath to lowercase in nginx using lua module
I want to make request url to lowercase before setting it for proxy pass.
here is my nginx file
location ^~ /admin/(?.*)
{
set_by_lua ngx.var.endpath string.lower(ngx.var.endpath)
proxy_pass …

Programmer
- 398
- 1
- 9
- 33
0
votes
1 answer
Nginx redirecting to an encoded URL passed as a argument in nginx?
I want to redirect from nginx to a URL that is send as an argument in the encoded form.
location /v1/redirect {
access_log /var/log/nginx/redirect/access.log main;
error_log /var/log/nginx/redirect/error.log;
return 302…

lifeisshubh
- 513
- 1
- 5
- 27
0
votes
1 answer
Unable to resolve wasm / unityweb errors un runcloud nginx server
Site is hosted on a Ubuntu 18 server
Managed by runcloud.io
PHP 7.4
runcloud's nginx default config.
We have a webgl build deployed on our staging server, and unable to get it to load without throwing console errors:
You can reduce your startup time…

Philip Smith
- 327
- 4
- 17
0
votes
0 answers
confusing on create nginx file site-available
Hi I created an instance in ec2 and connected elastic ip to it,
in the instance itself I installed a server that runs with this url http://172.17.0.2:5000/api/v1.0/,
the elastic ip is in this address (for example 54.193.250.150),
I have now…

Josh Katz
- 11
- 3
0
votes
1 answer
File name repeating in nginx
I'm trying to setup django project to work with gunicorn and nginx server. With DEBUG=FALSE.
I see in nginx log that static word is repeated twice thus changing the path.
# settings.py
"""
Django settings for cognizance project.
Generated by…

Tejas
- 35
- 1
- 10
0
votes
2 answers
how is Nginx finding default root
I just installed nginx using brew and its default config is located at /usr/local/etc/nginx. The server configuration in default conf file is as below (only small portion pasted)
server {
listen 8080;
server_name localhost;
…

prabodhprakash
- 3,825
- 24
- 48
0
votes
0 answers
Configure Nginx Reverse Proxy for wordpress stack
I have deployed a stack with wordpress and mariadb. If I try to access directly to the website with IP address and port it works but when i configure the reverse porxy with nginx it doesn't load the entire content. Maybe because of php loading or…

pingmyheart
- 27
- 1
- 7
0
votes
1 answer
Can't remove www from https links nginx
What I want to do
I want to redirect all to https non-www
http://mytestwebsite.com > https://mytestwebsite.com
http://www.mytestwebsite.com > https://mytestwebsite.com
https://www.mytestwebsite.com > https://mytestwebsite.com
I tried…

Aleksandar
- 59
- 1
- 7
0
votes
1 answer
nginx proxy_reverse not setting cookie from upstream server to the client browser
I have an expressjs server to authenticate login requests from a front app built in svelte.
The front app is running on frontenddomain.com and the expressjs server is running on backenddomain.com
Here is my login post route that authenticate and set…

Marco
- 1,051
- 19
- 41
0
votes
2 answers
PHP in .HTML pages not parsing on Nginx
I recently migrated a site from Apache to Nginx and now php code in html doesn't get parsed. .PHP pages parses without a problem as you can see in the attached image output of phpinfo.php in the bottom of this post.
This is how the code looks like…

Hugo
- 135
- 1
- 1
- 7
0
votes
1 answer
Redirect nginx www to https
Hi so I'm a complete beginner at using nginx. I have my website up and running and currently it redirects http to https. However if I vist www.example.com nginx will redirect it to https://www.example.com. How can I make it so www gets redirected to…

user
- 1,022
- 2
- 8
- 30
0
votes
0 answers
Want Common Nginx configuration on top of all Nginx configs
I have a server where nearly 50 different websites are hosted.
Each of them has a separate Nginx config file all of them are listening on port 443 with a different server_name and I want to block a certain location for all websites.
Is there a way…

aRvi
- 2,203
- 1
- 14
- 30