Title: nginx Reverse Proxy before Apache2 + WordPress &#8211; Permalinks issue
Last modified: October 13, 2016

---

# nginx Reverse Proxy before Apache2 + WordPress – Permalinks issue

 *  [insanitydesign](https://wordpress.org/support/users/insanitydesign/)
 * (@insanitydesign)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy-before-apache2-wordpress-permalinks-issue/)
 * Hi there
 * Because of some “circumstances” I have a setup of a nginx Reverse Proxy channeling
   some stuff to several different instances, one being an Apache2, which runs my
   WordPress blog.
 * Now, so far everything works fine but as soon as I want to use permalinks as 
   before, things get 404!
 * I found threads like
    [https://wordpress.org/support/topic/problem-with-permalinks-in-wordpress-site-within-subfolder-we-use-nginx/](https://wordpress.org/support/topic/problem-with-permalinks-in-wordpress-site-within-subfolder-we-use-nginx/)
   or [https://wordpress.org/support/topic/how-do-i-set-up-a-reverse-proxy-with-nginx/](https://wordpress.org/support/topic/how-do-i-set-up-a-reverse-proxy-with-nginx/)
   and especially [http://nginxlibrary.com/wordpress-permalinks/](http://nginxlibrary.com/wordpress-permalinks/),
   but all the solutions didn’t work out in my case.
 * Based on everything I found I tried:
 *     ```
       server {
               listen 80;
               server_name domain.com www.domain.com;
   
               root ...;
   
               # Add index.php to the list if you are using PHP
               index index.html index.htm index.nginx-debian.html index.php;
   
               gzip on;
               gzip_proxied    no-cache no-store private expired auth;
               gzip_static on;
   
               location / {
                       proxy_pass http://localhost:10080;
                       include /etc/nginx/proxy_params;
               }
   
               location /wp/ {
                       try_files $uri $uri/ /wp/index.php?$args;
               }
       }
       ```
   
 * and enabled permalinks with year, month, day and post but the result is a redirect
   back to the /wp URL and not the specific post or page.
 * I tried different versions with and without slashes, with q= parameter, with 
   proxy_pass in location /wp etc. but nothing would work out.
 * If anybody has an idea I would be thankful for any feedback.
 * Thanks a lot in advance

The topic ‘nginx Reverse Proxy before Apache2 + WordPress – Permalinks issue’ is
closed to new replies.

## Tags

 * [nginx](https://wordpress.org/support/topic-tag/nginx/)
 * [reverse proxy](https://wordpress.org/support/topic-tag/reverse-proxy/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [insanitydesign](https://wordpress.org/support/users/insanitydesign/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/nginx-reverse-proxy-before-apache2-wordpress-permalinks-issue/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
