0
votes
1answer
46 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
1answer
153 views

Nginx: nginx alias doesn't work

Here is the full config of my site: server { server_name back.mysite.com; access_log /home/django/mysite/deploy/logs/nginx_acc.log; error_log ...
1
vote
1answer
2k views

nginx, alias, php-fpm = File not Found

I'm trying to set up nginx with DAViCal. However, I'm getting a "File not Found" with a "FastCGI sent in stderr: "Primary script unknown" in the log. Looks like something is wrong with my aliasing but ...
1
vote
2answers
183 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
147 views

nginx alias using php5-fpm response 404

I use php5 fpm using nginx. but i have a problem. # debug alias location /bb/ { alias /usr/share/blahblah/; } file on http://mysite.localhost/bb/index.php was not found. but it's still on ...
0
votes
0answers
142 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
1answer
598 views

nginx giving 404 when accessing php from alias directory

I am trying to migrate from apache to nginx. The php sites that I am hosting need to access a shared library which turns out to be an alias directory. Below is the configuration I came up with. html ...
0
votes
1answer
531 views

Nginx alias and regex

i'll need a bit of help for alias on folder with nginx I have my folder www/ with the container of my site example.com and a lot of folder like client0, client1, client2... I should NOT modify ...
1
vote
1answer
236 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;} ...
7
votes
1answer
1k views

Can I alias all directory requests to a single file in nginx?

I'm trying to figure out how to take all requests made to a particular directory and return a json string without a redirect, in nginx. Example: curl -i http://example.com/api/call1/ Expected ...
3
votes
2answers
5k views

Why is my nginx alias not working?

I'm trying to set up an alias so when someone accesses /phpmyadmin/, nginx will pull it from /home/phpmyadmin/ rather than from the usual document root. However, everytime I pull up the URL, it gives ...
1
vote
1answer
2k views

Nginx try_files gotcha

Ok - i've been using this rule for a while location ~* /(?:abc12345|12abcdef)/(.*\.(jpe?g|gif|png)) { alias /usr/local/image/$1; error_page 404 /handler.php; } where if the image file ...
0
votes
2answers
355 views

Reverse proxy Nginx error with accessing munin

Now, I have munin setup so that it can be accessed by any virtual domain on my server by adding /munin/ to the end of the virtual domain. Apache alias setup looks like this -> Alias /munin ...
1
vote
2answers
1k views

Simple URI redirection / alias in Nginx

Please, how can I make this simple operation in Nginx: I wish that every requests for uris like: http://example.com/adm or: http://example.com/adm Goes to the wordpress login page: ...
2
votes
2answers
7k views

Alias using Nginx causing phpMyAdmin login endless loop

Recently I've been trying to set up a web server using Nginx (I normally use Apache). However I've ran into a problem trying to set phpMyAdmin up on an alias. The alias correctly takes you too the ...
1
vote
1answer
620 views

Forward (Alias? Redirect? Route?) subdomain to a directory in Nginx config

I would like to alias m.example.com so that the requests are forwarded/aliased to example.com/m/ but without the user being redirected to the /m/ directory. For example, the user accesses ...