File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
/**
4
4
* Nginx virtual host creater class
5
- * @author Tushar Kant Verma
6
5
*/
7
6
class NginxVhost
8
7
{
@@ -138,7 +137,8 @@ public function createPHPInfoFile() {
138
137
location / {
139
138
# First attempt to serve request as file, then
140
139
# as directory, then fall back to displaying a 404.
141
- try_files \$uri \$uri/ =404;
140
+ try_files \$uri \$uri/ @rewrite;
141
+ expires max;
142
142
}
143
143
144
144
location ~ \.php$ {
@@ -150,6 +150,7 @@ public function createPHPInfoFile() {
150
150
fastcgi_pass unix:/var/run/php5-fpm.sock;
151
151
fastcgi_index index.php;
152
152
include fastcgi_params;
153
+ fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/ {$ DOMAIN }/public/ $ fastcgi_script_name;
153
154
}
154
155
location ~ /\.ht {
155
156
deny all;
@@ -201,4 +202,4 @@ public function createPHPInfoFile() {
201
202
die ("Pass first parameter as 'create' or 'remove' " );
202
203
}
203
204
204
- ?>
205
+ ?>
You can’t perform that action at this time.
0 commit comments