nginx-config

Nginx alias breaks due to try_files $uri alias bug

為{幸葍}努か 提交于 2021-01-07 05:10:20
问题 I have a versioned Symfony API instance that I want to configure in the following manner: api.com/api/v1 -> /srv/api-v1/public/index.php api.com/api/v2 -> /srv/api-v2/public/index.php I've tried to approach this using nginx location and aliases, as it's Symfony we use try_files (as recommended) to check for an actual file prior to defaulting to index.php . Problem It seems there is a known nginx bug that breaks the $uri variable with an alias and try_files . How can I get around this bug to

Nginx alias breaks due to try_files $uri alias bug

谁说胖子不能爱 提交于 2021-01-07 05:04:43
问题 I have a versioned Symfony API instance that I want to configure in the following manner: api.com/api/v1 -> /srv/api-v1/public/index.php api.com/api/v2 -> /srv/api-v2/public/index.php I've tried to approach this using nginx location and aliases, as it's Symfony we use try_files (as recommended) to check for an actual file prior to defaulting to index.php . Problem It seems there is a known nginx bug that breaks the $uri variable with an alias and try_files . How can I get around this bug to

How to install a module on nginx?

前提是你 提交于 2021-01-01 04:31:53
问题 When running nginx -t I get this error: nginx: [emerg] unknown directive "subs_filter_types" in /etc/nginx/sites-enabled/my.site.com.conf:285 nginx: configuration file /etc/nginx/nginx.conf test failed So I need to install the substitution filter module and in the nginx documentation https://www.nginx.com/resources/wiki/modules/substitutions/#subs-filter-types Which says to run these commands: git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git ./configure --add

How to install a module on nginx?

一个人想着一个人 提交于 2021-01-01 04:31:04
问题 When running nginx -t I get this error: nginx: [emerg] unknown directive "subs_filter_types" in /etc/nginx/sites-enabled/my.site.com.conf:285 nginx: configuration file /etc/nginx/nginx.conf test failed So I need to install the substitution filter module and in the nginx documentation https://www.nginx.com/resources/wiki/modules/substitutions/#subs-filter-types Which says to run these commands: git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git ./configure --add

How setup subdomain in nginx?

我的未来我决定 提交于 2020-12-15 05:23:05
问题 I tried a few times do from the beginning but still, my subdomain doesn't work. I have ubuntu Nginx. I want to create a client-side and backend(subdomain) domain. The client-side config(work correctly): server { root /var/www/html/dist; # Add index.php to the list if you are using PHP index index.html; server_name hookahscope.com www.hookahscope.com; location ~ ^/(sitemap.xml) { root /var/www/html/public; } location / { try_files $uri /index.html; } listen [::]:443 ssl ipv6only=on; # managed

How setup subdomain in nginx?

血红的双手。 提交于 2020-12-15 05:22:27
问题 I tried a few times do from the beginning but still, my subdomain doesn't work. I have ubuntu Nginx. I want to create a client-side and backend(subdomain) domain. The client-side config(work correctly): server { root /var/www/html/dist; # Add index.php to the list if you are using PHP index index.html; server_name hookahscope.com www.hookahscope.com; location ~ ^/(sitemap.xml) { root /var/www/html/public; } location / { try_files $uri /index.html; } listen [::]:443 ssl ipv6only=on; # managed

NGINX not routing calls from react app to backend app

☆樱花仙子☆ 提交于 2020-08-26 07:34:48
问题 I have an AWS Ubuntu server that hosts a react front end running at 127.0.0.1:4100 and makes api calls to a Go app using port 127.0.0.1:1323. I installed Nginx and setup proxy pass for these two ports in /etc/nginx/sites-available/default config file but I only get the front end getting called by Nginx. Using chrome inspect to check why the Go app is not serving some of the functionalities from the react app, I see this error client.js:772 GET http://127.0.0.1:1323/api/ net::ERR_CONNECTION