-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<VirtualHost *:80> | ||
ServerName massapi.ghirardotti.fr | ||
ServerAdmin laurent@ghirardotti.fr | ||
|
||
<FilesMatch \.php$> | ||
SetHandler proxy:fcgi://127.0.0.1:9000 | ||
</FilesMatch> | ||
|
||
DocumentRoot /var/www/MassAPI/web | ||
<Directory /var/www/MassAPI/web> | ||
Options FollowSymLinks | ||
Options -MultiViews | ||
AllowOverride None | ||
Require all granted | ||
Allow from All | ||
|
||
RewriteEngine On | ||
|
||
# remove app.php | ||
RewriteRule "^app.php\/(.*)$" "/$1" [R=301,L] | ||
|
||
# Symfony2 | ||
RewriteCond "%{REQUEST_FILENAME}" "!-f" | ||
RewriteRule "^(.*)$" "app.php" [QSA,L] | ||
|
||
# TODO: See if needed: | ||
<Ifmodule mod_deflate.c> | ||
SetOutputFilter DEFLATE | ||
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | ||
</Ifmodule> | ||
<IfModule mod_expires.c> | ||
ExpiresActive On | ||
ExpiresDefault "access plus 1 month" | ||
ExpiresByType image/x-icon "access plus 1 year" | ||
ExpiresByType image/gif "access plus 1 month" | ||
ExpiresByType image/png "access plus 1 month" | ||
ExpiresByType image/jpg "access plus 1 month" | ||
ExpiresByType image/jpeg "access plus 1 month" | ||
ExpiresByType text/css "access 1 month" | ||
ExpiresByType application/javascript "access plus 1 year" | ||
</IfModule> | ||
<FilesMatch "\.(ttf|otf|eot|woff)$"> | ||
<IfModule mod_headers.c> | ||
Header set Access-Control-Allow-Origin "*" | ||
</IfModule> | ||
</FilesMatch> | ||
</Directory> | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/massapi_error.log | ||
CustomLog ${APACHE_LOG_DIR}/massapi_access.log combined | ||
</VirtualHost> |