Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nginx]

nginx (pronounced “engine-x”) is a lightweight, high-performance Web server/reverse proxy and e-mail (IMAP/POP3) proxy, licensed under a BSD-like license.

0
votes
0answers
13 views

No cache control for .mp4 file NGINX

I am serving a website using Nginx and the landing page has a short 7mb video that plays. Google insights is marking me down for not having a expire timer on that .mp4 video file. Except I do.. ...
0
votes
1answer
19 views

How to limit requests to certain domain in nginx?

I have a domain like sub.example.com. I'd like to allow GET access to certain paths uploads only through example.com Something like this: location ~ ^/uploads { allow example.com; ...
0
votes
1answer
18 views

Using nginx, I need my “bad user agent” map not to block my rss xml file

I use a map in nginx to block bad user agents (nutch and such). Some RSS readers have funny user agents, so I rather not run the map on that directory. Stripping down the nginx.conf file: server{ ...
1
vote
1answer
24 views

server reached pm.max_children setting (5)

Sorry, I am new and deleted my question thinking I had posted some info I should not have. I am posting the edited question once again: In our website, php5-fpm takes care of the php calls made by ...
1
vote
1answer
30 views

Nginx How to do 301 redirect from old domain to new domain except few URL

I am using nginx and trying to redirect all users from old domain to new domains., using this configuration. server { listen 80; server_name example.com; return 301 https://new-...
0
votes
1answer
11 views

How to redirect my-doamin.tdl/someurl to an index file in a different folder than webroot with nginx?

I've installd rocketchat on ubunru with nginx and like to redirect https://chat.myserver.tdl/privacy-policy to /a/folder/outside/webroot/index.html which redirection rule to apply in this usecase?
1
vote
1answer
31 views

Move a blog on a different server from a subdomain to a folder using Nginx

I have a node js application that runs on a VPS, and recently we added a blog to the site, we choose WordPress for the blog CMS, for avoiding configuring VPS for PHP and WP we moved blog to another ...
2
votes
0answers
30 views

Pagespeed not compressing images

Original image bart-had-a-groove.gif size is 753.43 KB. Processed image bart-had-a-groove.gif.pagespeed.ce.gB3ARqAHA8.gif size is still 753.43 KB. Mods used: pagespeed DisableRewriteOnNoTransform ...
-1
votes
1answer
45 views

Cannot find where my site is being cached! [closed]

So I have a bit of experience as a web master, but am at my whits end trying to find out what is caching my site. I cannot see any updates I make for the life of me. What I've tried: Clear ...
2
votes
1answer
148 views

Nginx fails to start HTTP/2 server due to error: unknown log format

In our hosting server from the Plesk cpanel, Nginx is configured to work as a reverse proxy engine. As I need to enable HTTP/2 that can speed up the loading time of Plesk and hosted websites. ...
2
votes
1answer
31 views

nginx: 301 redirect to non-www, SSL urls on default_server(s)

My goal is to have nginx primarily return a check for all requested URLs that start with http:// and/or contain //www., and 301 redirect them to the URL where //www. is replaced by // and http:// ...
1
vote
0answers
41 views

How to identify the source of 301 redirect loop on a WordPress site when server side caching plugin is enabled? [closed]

Our WordPress site has developed a 301 redirect loop error when web-server caching is enabled. With server caching disabled and caching plugin installed and active the issue doesn't occur, but the ...
1
vote
1answer
126 views

NGINX - Rewrite version number in JS file name to parameter for PHP

I had a rewrite from file.js?c=123 to file.js.php?c=123 but query params were downgrading my SEO evaluation. Actually, some proxy CDN do not cache query params. server { location ~ \startscript....
2
votes
1answer
105 views

NGINX - Rewrite .js.php file to .js

I have a dynamically created file start.js.php?c=21 and I would like to rewrite it's extension (to start.js, with query params). Is that possible? Is that a good method having such a rewrite? Is ...
0
votes
1answer
100 views

HTTPS + IP not redirecting to configured Domain Name and gives “Your connection is not private” [Nginx/Ubuntu]

I am using NGINX for 301 redirects on Ubuntu and reverse proxy for my Web Application and aim is to redirect traffic to non-www url such as https://mywebapplication.example. So with my current ...
3
votes
1answer
53 views

The effect of removing many URLs from google search console

I have been working as a web developer for several years, fixing issues, errors, and increasing page load speed etc. but I'm kinda new to SEO and Google Search Console. I have a client who is using ...
0
votes
1answer
35 views

Nginx url rewrites for changed shop categories

We recently moved from Magento 1 to 2, during the move we cleaned up our category urls to be more consistent. For instance we changed: /mens/mens-accessories/mens-wallets to : /mens/accessories/...
1
vote
0answers
42 views

nginx rewrite rule not applied (using contao cms)

I am trying to make a redirect for https://mypage.com/foo to https://mypage.com/bar while still keeping https://mypage.com/foo in the browser url. I have tried several combinations of different ...
1
vote
0answers
30 views

Identify a user agent consuming massive bandwidth downloading and uploading specific files but never sending a referrer

Blank HTTP_REFERER user agents are downloading and uploading a couple specific files to and from our server! This is causing HUGE bandwidth and CPU usage. We blocked blank referers on our CDN and ...
1
vote
0answers
309 views

Append basic authentication header NGINX to existing authentication header of upstream application

Assume the following setup: The NGINX reverse proxy is asking for basic authentication (which is a good habit when you expose things on the internet). Basic authentication uses the Authorization ...
2
votes
1answer
140 views

Wildcard certificate with certbot and DNS challenge

I am trying to obtain a wildcard certificate from Let's Encrypt for my web server. Since I am using a "local" hoster, certbot has no DNS authenticator plugin for it. So I have to use the manual ...
1
vote
0answers
29 views

HTML5 navigation and search engine optimization

I'm trying to use HTML5 navigation for AngularJS application. Everything works well, until SEO optimisation. For hashbang sub-urls (example.com/#!/siuburl) most of crawlers (google, facebook) which ...
0
votes
0answers
22 views

Is Nginx able to make a site with limit requesting even through visiting internal site (Prohibit external visiting)

I am new to Nginx. I have been using Apache. I have a docker image which is a web site I want to make it be visit only internally. I refer some Nginx books. It has some function unique to Apache ...
2
votes
0answers
315 views

Non-www to www redirect not working in Firefox; Works in Chrome with nginx server

I've configured my website to have https with www scheme. I opted to redirect all the traffic from non-www to www, at the time of setting up LetsEncrypt SSL certificate and it works absolutely fine on ...
1
vote
1answer
31 views

Wordpres and Nginx redirection

I have a Wordpress site with nginx webserver i have a certain requirement. So Wordpress used to be main website, with a blog permalink which opens a page with all the blog list there,But now we have ...
1
vote
1answer
46 views

How to set up a reverse proxy on an SSL subdirectory from another server?

Setup is as follows: Our agency's client's domain is https://www.example.com (with SSL certificate from Amazon) They have NGINX severs, and manage their own hosting They want us to build a few simple ...
1
vote
0answers
28 views

Can dbadmin be secured under nginx by using a rewrite rule to a 404?

I'm trying to redirect all 404 pages to a custom handler with NGINX. I spent few hours to made the following rewrite in nginx but my question is: can it be a security breach? location ~ ^/(?!(dbadmin)...
1
vote
0answers
53 views

Is it good to crawl metadata via proxy for several bot engines?

I am new to AngularJS and due to some technical issues or maybe I'm just not aware of the right way, I am facing SEO related issues. So at the moment I plant a proxy server running behind the main ...
1
vote
0answers
35 views

Remove non-existent language directory from URLs under nginx

I've got URLs like this: /lang/path-to-file.ext and I want to remove the "lang" because it doesn't exist: /path-to-file.ext How do I do that on an nginx server?
4
votes
1answer
155 views

Preventing URLs ending in “/” from search engine indexes with robots.txt or rewrite rule

Is there a programmatic way to easily deal with the issue of search engines considering pages where the page works with and without the trailing slash duplicates like via a robots.txt or Nginx rewrite ...
4
votes
1answer
395 views

Nginx rewrite problem - displaying same page with or without .php extension after rewrite

I have implemented the following Nginx code: location / { try_files $uri $uri.php $uri/ @extensionless-php; index index.html index.htm index.php; } location ~ \.php$ { try_files $uri =...
1
vote
0answers
25 views

nginx proxy pass to standalone application

I'm trying to use pass traffic which is going to www.example.com/subfolder to a standalone application running on the same machine. Here is what I have: server { listen 80 default_server; ...
1
vote
0answers
183 views

Multiple SSL server blocks with nginx on single ec2 instance

I've asked this question before and I think I found a potential answer on the nginx Website, which is to have multiple internal IPs for the Web server to listen on. I don't know how to do that with ...
1
vote
1answer
40 views

.htaccess Rewrite whole dir contents to another

I am trying to rewrite the whole contents of a directory to the home url. so, if someone visits www.example.com/bnn27sh32j@d299/gold it should take them to www.example.com/gold I have tried: ...
2
votes
1answer
48 views

HTTPS request connection timeout (NGINX)

I tried a lot by reading different answers on Stackoverflow and other forums but unable to identify the error, can someone please check the below configuration and tell me what could be wrong? server ...
3
votes
2answers
1k views

nginx http to https redirect - just isn't working

I am running my own webserver with nginx on ubuntu 17.10. I have opened ports 80 and 443. Trying to get the HTTP to HTTPS redirect working, but everthing i seem to have tried fails. i am still ...
0
votes
0answers
56 views

How do I redirect URLs ending with %5C,m3 using nginx?

On my WordPress setup I am noticing a lot of 404s with the following format: https://example.com/post-1/%5C,m3= https://example.com/post-2/%5C,m3= ... My guess is that %5C,m3= is being added by some ...
2
votes
1answer
710 views

Disable Direct IP Access on VestaCP NGINX + Apache2

In the current version of VestaCP once you install it and access your server's IP it will return the latest website you've added in VestaCP. This is bad on so many levels and I consider it a ...
2
votes
0answers
171 views

Is it possible to serve static content of my SPA for SEO Purpose.

Is it possible to serve static content of my SPA for SEO Purpose. I have designed website in Angular4 and it is working fine. But I have used Material design and other libs which are not compatible ...
1
vote
0answers
16 views

How to make new domain redirect to specific page of main domain without losing SEO?

So I have a exchange office (lets say www.example.com) Wordpress website and I bought a new domain just to sell Euro (www.euroexample.com). I want this new domain to show the specific page for Euro ...
1
vote
0answers
683 views

How to disable http method verb tunneling in nginx

Our security team ran a web-inspect security scan on our site and asked us to disable verb tunneling using headers or query parameters such as X-HTTP-Method, XHTTP-Method-Override, X-Method-Override, ...
1
vote
0answers
197 views

How to enable gzip compression for CSV files on Github Pages?

Pretty much title. The majority of my Github Pages site is being gzipped, but for some reason CSV files are ignored. This is unfortunate, because for some client-side visualizations a 10 megabyte CSV ...
3
votes
1answer
404 views

Trouble replacing old SSL certificate on Nginx

Disclaimer: This is my first ProWebmasters post. I thought this would be an appropriate place for this question but if it is not I'm happy to remove it. We use SSL For Free for our business site. We ...
1
vote
0answers
101 views

How do I run blog subdomain with ghost blog and linode?

I want a prepare a blog using ghost in a subdomain of my website. I made a A/AAAA record in linode settings: A/AAAA Records Hostname IP Address TTL Options 139.162.250.252 Default Edit | Remove ...
0
votes
1answer
318 views

Nginx to default to index.php

Using raspbian stretch, and have configured a site using: server { listen 80 default_server; # what does this do? listen [::]:80 default_server; root /var/www/html; index index.php; ...
0
votes
0answers
272 views

Trying to remove “The X-powered header is sent within the response header.” on Apache/nginx

I am trying to address the above issue which is cropping up in SEO. The following solution is the one that is suggested: <IfModule mod_headers.c> # Unset Server Signature header ...
0
votes
0answers
43 views

Nginx rewrite for wp-includes works but not the one for content/uploads

I want to perform a few rewrites: this actually works: rewrite ^/includes/(.*) /wordpress/wp-includes/$1?putyo_happybits=administrator last; and I get this: http://everhide.wordpress.dev/includes/...
0
votes
0answers
14 views

Nginx - inherit configuration for executing Perl

Is possible to inherit rule of executing Perl files (*.pl) for whole server? I mean that I will declare block "location ~ .pl$ {}" only once and it will inherit for all aliases. Because now if I want ...
3
votes
1answer
2k views

Nginx: set Content-Type by URI problem

I'm setting up small personal file hosting, I made a backend to store uploaded files by their hash directly on the HDD like /f/ab/cd/ef012345678..., but without file extensions and generate an URI ...
3
votes
1answer
583 views

Adding “expires” directive in Nginx conf for assets causes “404 not found” errors

I have a live Django site running gunicorn, nginx, supervisord. I am trying to implement the suggestions found here to increase my page speed score by using gzip in nginx. The resulting config file is ...