The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
31 views

Multi-tenant site and global privacy issues [closed]

I have a multi-tenant website. It has been hosted in the USA for many years with no problem. In recent years my customers in Australia, Canada and the EU have shared concerns as their countries ...
0
votes
1answer
29 views

alias directive with nested location to catch php files - requests for php files giving 404

I have a directory/web app that is located outside of the web root directory of my site. Say the site is here: /var/www/site/htdocs/ And the external app is located here: /var/www/apps/coolapp/ ...
0
votes
0answers
25 views

Nginx: Switch path depending on location

I'am very new to nginx and I have to realize a location switch. We have a single point of entry https://www.main.de/. At this single point of entry I have to split up the requests depending on the ...
1
vote
0answers
28 views

How do I get an Nginx non root ( “/” ) location to serve files?

I'm a Nginx beginner. I rented a little VPS with Ubuntu 12.04 to test. I rented no domain so I make requests directly using the ip. For this question let's assume the ip is 209.208.26.89. Installed ...
1
vote
2answers
224 views

nginx unwanted location redirect with trailing slash

I have a location location /pass/ { proxy_pass http://localhost:12345/; } So it is supposed to proxify urls http://example.com/pass/whatever to http://localhost:12345/whatever The thing I ...
0
votes
2answers
94 views

nginx - owncloud under location

I want to put owncloud under a location in my default virtual host. I also want to redirect to https. I have got it working with phpmyadmin but i can't with owncloud. This is the suggested ...
0
votes
0answers
34 views

Apache - Deny access for a sub-location

I have an apache server, and I have configured the location /rest To be open for everyone. Now, I want a sub-location to only allow access from certain IP addresses. I got it working, by doing ...
0
votes
0answers
24 views

Nginx - redirect to location inside PHP block

I want to redirect http://example.com/newsite/ using proxy pass to another server, so I put location /newsite/ { proxy_pass http://newsite.com/; } and it works fine. The problem is ...
-1
votes
1answer
23 views

Nginx alias redirection error

For one of my projects, I would like to setup a static domain to improve speed. I am faced with a small problem. I would like to redirect URL like this : http://mydomain.com/[URL]/img/toto.jpg to ...
0
votes
0answers
14 views

Combining Location and Directory with BasicAuth

I have set up some basic auth on a site, which is working fine. I get prompted to authorise for all requests except to filea or fileb. <Directory "/var/www/vhosts/domain.com/public"> ...
1
vote
0answers
174 views

How to create an nginx rewrite to timthumb.php

I have a website that has many custom image sizes. I'm following this example which uses apache but I need to recreate this on an Nginx server. ...
0
votes
1answer
670 views

Nginx location override does not do what I want, opinions welcome

I have a Nginx configuration file that works for everything except one feature. I have installed a Mediawiki, it works pretty well except at showing pictures (loading them works fine). Whereas (sorry ...
0
votes
2answers
87 views

How to make fallback for images correctly?

I have the following location that handles my assets: location ~ \.(?:css|js|jpe?g|png) { root /var/static; } So if a request is www.mysite.com/img/file.png the file.png will be taken from ...
1
vote
1answer
191 views

Nginx: Redirect all traffic to Coming Soon page except own IP

I have a folder called "coming-soon" that I would like to redirect all traffic to when the site is down for maintenance. Currently, this is what I did: ----- START ----- location / { allow ...
0
votes
1answer
186 views

Can we jump to another location from a location in nginx? [closed]

I am trying to achieve something like this: location /location1/{ if ($arg_api_key = a_valid_api_key) { proxy_pass http://localhost:8080; } # else jump to location2 } location ...
1
vote
2answers
143 views

nginx location overwrites alias

I have an alias "/temp" that works ok, but when I add another location block, the alias returns 404. Working config: http://mysite.com/temp/blank.gif -> OK server { # ... location /temp { ...
0
votes
1answer
47 views

possible to have 2 nginx location block with same matching criteria?

For example, if I want to split my prevent hotlink block from caching definition block, and put them in seperate .conf file to be included latter by main.conf, will nginx only match the first one? ...
0
votes
1answer
710 views

Hosting Cacti install from NginX

I have having an issue with hosting a Cacti installation from NginX. I have cacti installed under /usr/share/cacti and the below block in my default NginX config file. location / { root ...
0
votes
3answers
229 views

What does the Nginx location “~ \..*/.*\.php$” do?

This question is related to Drupal & nginx : a sound “general purpose” configuration? I've successfully configured Nginx based on a number of examples I've found. Things are working fine, but I ...
0
votes
1answer
544 views

nginx make root of domain go to subfolder

I think that what I'm trying to acomplish is similar to question (=">Rewrite a subdirectory to root on nginx) but I'll try to explain it better so what I'm trying to do it to have the root of the ...
0
votes
2answers
254 views

Nginx location and root

I think I have a trivial problem with nginx but I can't see it. I have the following file tree: /data/www > main/ >> html/ >>>...some files (A) > wiki/ >>...some files ...
2
votes
1answer
151 views

Web Server Routing Based On Location

I have a website that has users from both Hong Kong and Australia. Unfortunately, since the server is located in Australia, users from Hong Kong are going to suffer latency problems. Traffic has to ...
0
votes
0answers
319 views

SSLVerifyClient optional with location-based exceptions

I have a site that requires authentication in order to access certain directories, but not others. (The "directories" are really just rewrite rules that all pass through /index.php) In order to ...
0
votes
1answer
142 views

check parameters in nginx location then return

I wanna check my url's and return "200 Response code" when the "CODE" parameter is "000000000000" for example for this request: ...
0
votes
0answers
132 views

Serving a file with nginx

I have a webapp built in angular.js and angular. Since angular takes care of most urls by itself, i want to serve the file indexAng.html (along with any arguments) in response to a request for ...
1
vote
2answers
157 views

nginx rewriting location of permanent rewrites

I am trying to redirect from mydomain.com to www.mydomain.com .. However, nginx is rewriting the location-header to $host. server{ server_name mydomain.de; set $root /srv/www/mydomain.de; ...
0
votes
1answer
517 views

Nginx location to match query parameters

Is it possible in nginx to have a location {} block that matches query parameters. For example I want to pick up that "preview=true" in this url and then instruct it to do several different things, ...
0
votes
1answer
44 views

Find out where PHP is coming from? [closed]

If I type which php I get /Applications/MAMP/bin/php/php5.3.6/bin/php If I type where php I get /Applications/MAMP/bin/php/php5.3.6/bin/php /usr/bin/php And that's fine, but I am trying to ...
5
votes
3answers
959 views

Why is ping to Google servers and Google DNS so low?

I noticed that ping to Google DNS and to google.com from Serbia is about 15ms, but google servers are located in California! http://www.geoiptool.com/en/?IP=173.194.39.110 My dedicated server is ...
1
vote
1answer
239 views

URL-rewriting / try_files with Nginx's location directive

I have multiple Wordpress / Joomla instances under the same subfolder, is there a simple way to do the following statement in one location block? location /site1/ { try_files $uri $uri/ ...
1
vote
1answer
309 views

trouble with location regex and redirection in nginx

I want to setup proxy in nginx: location ~ ^/m/([^/]*)/([^/]*)/([^/]*)$ { proxy_pass http://127.0.0.1:8080/redir/m/$1/$2/$3; proxy_redirect off; proxy_set_header Host $host; proxy_set_header ...
0
votes
1answer
229 views

Nginx Execute Multiple Location Blocks

I have the following nginx location block: location ^~ /publish { allow 127.0.0.1; #Allow home allow 99.100.101.102; deny all; } Then this location block to process PHP after: location ...
0
votes
1answer
396 views

Nginx location block behave recursively

I have the following location block in nginx: location /stats { allow 127.0.0.1; deny all; } If I try and view /stats from my home MacBook I get 403 Forbidden as expected. However, if I view ...
1
vote
1answer
142 views

Nginx location block specific file

I have the following nginx location blocks: location /publish/domain.io.php { allow 127.0.0.1; deny all; } location ~\.php { try_files $uri =404; fastcgi_index index.php; fastcgi_param ...
2
votes
2answers
275 views

nginx location pathing issue

I've got a pretty much default sites-enabled set up in my nginx on debian squeeze and i'm now trying to get it to serve up my munin graphs on myhost/munin/ Heres the location i've added to the config ...
1
vote
1answer
225 views

nginx - request getting handled by multiple location blocks

I'm testing a setup where I'd like to have nginx serve up static media and proxy all other requests to another backend. My configuration looks like this: location /media {alias /var/httpd/media;} ...
2
votes
2answers
1k views

How to allow specific IP's to a URL (not directory!) in Nginx

I'm trying to deny access to a specific URL on our site running on Nginx but allow it from specific IP's, I've been trying to fiddle around using Location but it seems that's just trying to find a ...
1
vote
1answer
1k views

nginx: How can I set proxy_* directives only for matching URIs?

I've been at this for hours and I can't figure out a clean solution. Basically, I have an nginx proxy setup, which works really well, but I'd like to handle a few urls more manually. Specifically, ...
1
vote
1answer
124 views

Network with 3 locations connected through VPN; beginner

I already asked this question but i did not provide enough info, i am sorry for that so i drew a schematic of the network. I am a student IT (networks) first year, and i am making a fictional network ...
0
votes
2answers
162 views

Nginx redirect certain location to separate server

I am trying to separate our application server from our website gallery storage. I have an application server on xxx.xxx.xxx.1 and gallery server with all the images on xxx.xxx.xxx.2 . Now I want to ...
3
votes
3answers
3k views

nginx rewrite append a parameter at the end of an url

I need to configure my reverse proxy so that the following parameter will be added at the end of the url: &locale=de-de This almost works: rewrite ^(.*)$ $1&locale=de-de break; However, the ...
1
vote
1answer
298 views

Nginx location issue

I'm trying to set a longer (30 day) 'expires' header for my (images only) in the /misc-stuff/ directory. This is what I'm using for my site : # Serve static files directly from nginx location ~* ...
0
votes
1answer
330 views

Multiple protected locations with Nginx

I am trying to secure couple of locations using the basic HTTP authentication that comes with Nginx, but for some reason it won't work. I have: website.com/admin (This is accesible by user ADMIN) ...
2
votes
3answers
2k views

nginx Block IP based on URI in one 'location'

There is currently a block of one location / location / { root /var/www/docs; proxy_pass http://backend; proxy_buffering on; proxy_buffer_size 64k; proxy_buffers ...