Title: WP behind Apache reverse Proxy not working
Last modified: December 17, 2019

---

# WP behind Apache reverse Proxy not working

 *  [blackraz0r](https://wordpress.org/support/users/blackraz0r/)
 * (@blackraz0r)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wp-behind-apache-reverse-proxy-not-working/)
 * Hello,
 * i tried to find help with this via google and reddit homelab. no succes for no.
   so sry but i think i have to bother you guys now. 😉
 * > [Need Help with WordPress behind an Apache Reverse Proxy (no CSS)](https://www.reddit.com/r/homelab/comments/ebwev1/need_help_with_wordpress_behind_an_apache_reverse/)
   > 
   > by[u/Blackraz0r](https://www.reddit.com/user/Blackraz0r/) in[homelab](https://www.reddit.com/r/homelab/)
 * basically it should be easy:
 * i have an apache reverse proxy wich servers my whole lab. Organizr, Nextcloud,
   Wekan, all those webservices, you get the idea.
 * but it just does not work with WP
 * so far my reverse proxy config looks like this:
 * Docker Compose file:
 *     ```
       version: '2'
   
       services:
          db:
            image: mysql:5.7
            volumes:
              - wp_db_data:/var/lib/mysql
            restart: always
            environment:
              MYSQL_ROOT_PASSWORD: wordpress
              MYSQL_DATABASE: wordpress
              MYSQL_USER: wordpress
              MYSQL_PASSWORD: wordpress
   
          wordpress:
            image: wordpress:latest
            volumes:
              - wp_data:/var/www/html
            ports:
              - 9500:80
            restart: always
            environment:
              WORDPRESS_DB_HOST: db:3306
              WORDPRESS_DB_USER: wordpress
              WORDPRESS_DB_PASSWORD: wordpress
       ```
   
 * Reverse Proxy Apache HTTP:80
 *     ```
       <VirtualHost home.mydomain.de:80>
       ServerName home.mydomain.de
       ProxyPass / http://10.250.30.220:9500/
       ProxyPassReverse / http://10.250.30.220:9500/
       RewriteEngine on
       RewriteCond %{SERVER_NAME} =home.mydomain.de
       RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
       </VirtualHost>
       ```
   
 * then i let certbot create a file for HTTPS:443:
 *     ```
       <IfModule mod_ssl.c>
       <VirtualHost home.mydomain.de:443>
       ServerName home.mydomain.de
       ProxyPass / http://10.250.30.220:9500/
       ProxyPassReverse / http://10.250.30.220:9500/
   
       SSLCertificateFile /etc/letsencrypt/live/home.mydomain.de/fullchain.pem
       SSLCertificateKeyFile /etc/letsencrypt/live/home.mydomain.de/privkey.pem
       Include /etc/letsencrypt/options-ssl-apache.conf
       </VirtualHost>
       </IfModule>
       ```
   
 * normaly my service would be accesible via home.mydomain.de now.
    with WP this
   is only partially the case. it looks like this:
 * > [View post on imgur.com](https://imgur.com/XmbBZEx)
 * can someone tell my what the error is ?
    pls be patient with me. i look for the
   last magical piece of code to add in the reverse proxy config to make it work.
   pls help me, im kinda frustrated.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [JNashHawkins](https://wordpress.org/support/users/jnashhawkins/)
 * (@jnashhawkins)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/wp-behind-apache-reverse-proxy-not-working/#post-12247751)
 * I don’t know the answer but maybe you might seek some help over at Stack Exchange.
   I imagine someone there knows something about this.
 * [https://stackexchange.com/sites](https://stackexchange.com/sites)
 * If they don’t know then they probably know where to send you next.
 * It’s not a WordPress issue!
 *  [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/wp-behind-apache-reverse-proxy-not-working/#post-12367051)
 * It might be helpful to add to wp-config.php the following line:
    `$_SERVER['HTTPS']
   = 'on';` Just before the line: `require_once(ABSPATH . 'wp-settings.php');`
    -  This reply was modified 6 years, 4 months ago by [Condless](https://wordpress.org/support/users/condless/).
 *  [robertolopezhaley](https://wordpress.org/support/users/robertolopezhaley/)
 * (@robertolopezhaley)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/wp-behind-apache-reverse-proxy-not-working/#post-12426839)
 * Hello everyone… I’m new to WordPress and I’m trying to setup a website following
   the tutorials that there are on the web but I’m stuck because the apache server
   doesn’t turn green on MAMP panel and therefore I can’t open the page. I’ve changed
   the port 80 to 8080 as I’ve been trying to mend this with the help of tutorials.
   No luck. Still the same state. I’ve tried installing xamp and there it turns 
   on green, but then I don’t know how to follow to the next step.
    If anyone could
   give me a hand I’d be very really happy. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WP behind Apache reverse Proxy not working’ is closed to new replies.

## Tags

 * [apache](https://wordpress.org/support/topic-tag/apache/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 4 participants
 * Last reply from: [robertolopezhaley](https://wordpress.org/support/users/robertolopezhaley/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/wp-behind-apache-reverse-proxy-not-working/#post-12426839)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
