Created
April 29, 2012 20:04
-
-
Save pix2D/2552976 to your computer and use it in GitHub Desktop.
ActiveCollab 3 + NGINX + PHP-FPM + SSL + /public as document root
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
<?php | |
/** | |
* activeCollab configuration file | |
*/ | |
define('ROOT', '/home/example/public_html/activecollab'); | |
define('ROOT_URL', 'https://example.com'); | |
define('URL_BASE', ROOT_URL . '/'); | |
define('ASSETS_URL', ROOT_URL . '/assets'); | |
define('PATH_INFO_THROUGH_QUERY_STRING', false); | |
// Other config stuff below (this will be different for each install so it's not included here |
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
server { | |
listen [ip-address]:80; | |
server_name example.com; | |
root /home/example/public_html/public; | |
access_log /var/log/nginx/access.log; | |
location / { | |
try_files $uri $uri/ /index.php?path_info=$uri&$args; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
include fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_intercept_errors on; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_pass unix:/var/run/php-fpm-example.sock; | |
} | |
} |
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
server { | |
listen [ip-address]:80; | |
server_name example.com; | |
rewrite ^(.*) https://$server_name$1 permanent; | |
} | |
server { | |
listen [ip-address]:443 ssl; | |
server_name example.com; | |
root /home/example/public_html/public; | |
ssl_certificate certificates/example.com.crt; | |
ssl_certificate_key certificates/example.com.key; | |
access_log /var/log/nginx/access.log; | |
location / { | |
try_files $uri $uri/ /index.php?path_info=$uri&$args; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
include fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_intercept_errors on; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param HTTPS on; | |
fastcgi_param HTTP_SCHEME https; | |
fastcgi_pass unix:/var/run/php-fpm-example.sock; | |
} | |
} |
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
[example] | |
user = example | |
group = example | |
listen = /var/run/php-fpm-example.sock; | |
pm = ondemand | |
pm.max_children = 15 | |
pm.process_idle_timeout = 300s | |
pm.max_requests = 500 | |
request_terminate_timeout = 120s | |
chdir = / | |
php_admin_value[open_basedir] = /home/example/public_html:/tmp | |
php_admin_value[cgi.fix_pathinfo] = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment