Zdravím,
řešil jsem dnes přesun webu s jedním člověkem, co má na starost serverovnu menší společnosti na Vysočině. Preferuje na místo Apache Nginx, tam je zápis mod_rewrite jiný. Tak ho dal dohromady podle Joomly a tady Vám ho postuji, kdyby se hodil:
map $request_uri $request_key {
default "";
~^/(?P<key>.+)$ $key;
}
server {
server_name www.domena.cz domena.cz;
access_log /home/www/www.domena.cz/access.log;
error_log /home/www/www.domena.cz/error.log;
root /home/www/www.domena.cz/wwwroot;
location / {
index index.html index.htm index.php;
# Support Clean (aka Search Engine Friendly) URLs</tt>
try_files $uri $uri/ /index.php?_rwp=$request_key;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/home/php/php.socket;
fastcgi_index index.php;
include phpfastcgi_params;
}
}
řešil jsem dnes přesun webu s jedním člověkem, co má na starost serverovnu menší společnosti na Vysočině. Preferuje na místo Apache Nginx, tam je zápis mod_rewrite jiný. Tak ho dal dohromady podle Joomly a tady Vám ho postuji, kdyby se hodil:
map $request_uri $request_key {
default "";
~^/(?P<key>.+)$ $key;
}
server {
server_name www.domena.cz domena.cz;
access_log /home/www/www.domena.cz/access.log;
error_log /home/www/www.domena.cz/error.log;
root /home/www/www.domena.cz/wwwroot;
location / {
index index.html index.htm index.php;
# Support Clean (aka Search Engine Friendly) URLs</tt>
try_files $uri $uri/ /index.php?_rwp=$request_key;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:/home/php/php.socket;
fastcgi_index index.php;
include phpfastcgi_params;
}
}