Created
October 3, 2011 16:21
-
-
Save xeoncross/1259505 to your computer and use it in GitHub Desktop.
Basic server vhost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <VirtualHost *:80> | |
| ServerName domain.tld | |
| ServerAdmin [email protected] | |
| DocumentRoot /var/www/domain.tld/ | |
| # mod_rewrite rules | |
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^(.*)$ index.php/$1 [QSA,L] | |
| </VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server | |
| { | |
| listen 80; | |
| server_name domain.tld; | |
| root /home/user/www/domain.tld; | |
| # Route all requests for non-existent files to index.php | |
| if (!-e $request_filename) { | |
| rewrite ^/(.*)$ /index.php/$1 last; | |
| } | |
| # Pass PHP scripts to php-fastcgi listening on port 9000 | |
| location ~ \.php { | |
| include fastcgi_params; | |
| fastcgi_pass 127.0.0.1:9000; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment