Title: Apache web server configuration file for WordPress
Last modified: August 9, 2022

---

# Apache web server configuration file for WordPress

 *  [softrain](https://wordpress.org/support/users/softrain/)
 * (@softrain)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/)
 * There is an official help page that shows nginx + php-fpm configuration files
   for serving WordPress ([https://wordpress.org/support/article/nginx/](https://wordpress.org/support/article/nginx/)).
   Is there a similar guide for using the Apache web server with php-fpm for serving
   WordPress?
 * I came up with my own Apache web server configuration file, which seems to work.
   However, I am not sure if there are any gotchas. It would be good if the WordPress
   support articles also provided a sample configuration for Apache + php-fpm.
 *     ```
       <VirtualHost *:80>
           ServerName example.com
           DocumentRoot "/var/www/wordpress"
           <Directory "/var/www/wordpress">
               Require all granted
               DirectoryIndex index.php
               AllowOverride FileInfo
               FallbackResource /index.php
           </Directory>
           <Directory "/var/www/wordpress/wp-admin">
               FallbackResource disabled
           </Directory>
           ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/var/run/php/php-fpm.sock|fcgi://dummy/var/www/wordpress
       </VirtualHost>
       ```
   

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

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15900572)
 * Give this a read.
 * [https://wordpress.org/support/article/nginx/](https://wordpress.org/support/article/nginx/)
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15900948)
 * I’ll share my apache config: [https://gist.github.com/sterndata/f27fb487ea9442e02379a668e10cd08b](https://gist.github.com/sterndata/f27fb487ea9442e02379a668e10cd08b)
 *  Thread Starter [softrain](https://wordpress.org/support/users/softrain/)
 * (@softrain)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15901446)
 * [@jdembowski](https://wordpress.org/support/users/jdembowski/) Thank you, but
   that is for Nginx, not Apache. I have already provided that same link in the 
   original post.
 *  Thread Starter [softrain](https://wordpress.org/support/users/softrain/)
 * (@softrain)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15901453)
 * [@sterndata](https://wordpress.org/support/users/sterndata/)
    Regarding the `
   ProxyPassMatch ^/(.*\.php(/.*)?)$ unix://var/run/php-fpm/www.sterndata.com.sock
   |fcgi://127.0.0.1:9000/var/www/www.sterndata.com/wordpress timeout=300` part 
   of your configuration, can the `127.0.0.1:9000` be replaced by anything (e.g.`
   blablabla`)?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15901472)
 * If php-fpm is running on the same server, that’s what it should be. I think 9000
   is the default port.
 *  Thread Starter [softrain](https://wordpress.org/support/users/softrain/)
 * (@softrain)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15901478)
 * [@sterndata](https://wordpress.org/support/users/sterndata/)
    When I replaced`
   fcgi://127.0.0.1:9000` with `fcgi://loremipsum` or `fcgi://dummyvalue` and restarted
   Apache, nothing bad happened; WordPress ran properly.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15901481)
 * Well, score one for the good guys! Enjoy.
 *  Thread Starter [softrain](https://wordpress.org/support/users/softrain/)
 * (@softrain)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15901575)
 * [@sterndata](https://wordpress.org/support/users/sterndata/)
 * > Well, score one for the good guys! Enjoy.
 * What does that mean?

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

The topic ‘Apache web server configuration file for WordPress’ is closed to new 
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [softrain](https://wordpress.org/support/users/softrain/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/apache-web-server-configuration-file-for-wordpress/#post-15901575)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
