Hi,
I am running the latest DA 1.53 on Centos 6 and changed from apache to nginx.
To get wordpress sites with friendly urls running I had to create a custom template for nginx_php.conf and included the folowing
this works well, now wordpress shows the friendly urls again.
I also want to add another version of php. I am still running 5.6 but I want to run 7.0 as the main version and 5.6 as the secondary.
In order to make the friendly urls working in both versions I have to include the above function for both php versions, but there I get stuk.
This is what I have
when restarting nginx I het the message it can't because of the duplicate location directive.
Can someone help me fix this?
Thanks
I am running the latest DA 1.53 on Centos 6 and changed from apache to nginx.
To get wordpress sites with friendly urls running I had to create a custom template for nginx_php.conf and included the folowing
location / {
try_files $uri $uri/ /index.php?$args;
}
this works well, now wordpress shows the friendly urls again.
I also want to add another version of php. I am still running 5.6 but I want to run 7.0 as the main version and 5.6 as the secondary.
In order to make the friendly urls working in both versions I have to include the above function for both php versions, but there I get stuk.
This is what I have
|*if HAVE_PHP1_FPM="1"|
# use fastcgi for all php files
location ~ \.php$
{
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/nginx_limits.conf;
if (-f $request_filename)
{
fastcgi_pass unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock;
}
}
location / {
try_files $uri $uri/ /index.php?$args;
}
|*endif|
|*if HAVE_PHP2_FPM="1"|
# use fastcgi for all php files
location ~ \.php|PHP2_RELEASE|$
{
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/nginx_limits.conf;
if (-f $request_filename)
{
fastcgi_pass unix:/usr/local/php|PHP2_RELEASE|/sockets/|USER|.sock;
}
}
location / {
try_files $uri $uri/ /index.php?$args;
}
|*endif|
when restarting nginx I het the message it can't because of the duplicate location directive.
Can someone help me fix this?
Thanks