tnx for helpsukhman21 said:Did you replace 127.0.0.1 with your server name in this line?
fastcgi_pass 127.0.0.1:9000;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
can i give my user password? plsadam said:If you raised a ticket on Saturday it wont get responded to until today. We do not operate support on the weekends, this is shown on the support system.
You are missing this part:
Although nginx may be configured differently so you may need to use 127.0.0.1:9001 or the proxy host.Code:# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
If you're unsure I'd really recommend getting a server admin to do the work, you should be comfortable with using nginx if you're running it on your server.
when i use them its not working at allsukhman21 said:where did you even get these rules?
why dont you use the ones that come with the script ?
dear Adam ... i have nginx standalone with php-fpm ...i think i cant use fastcgi rulesadam said:If you raised a ticket on Saturday it wont get responded to until today. We do not operate support on the weekends, this is shown on the support system.
You are missing this part:
Although nginx may be configured differently so you may need to use 127.0.0.1:9001 or the proxy host.Code:# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
If you're unsure I'd really recommend getting a server admin to do the work, you should be comfortable with using nginx if you're running it on your server.
adam said:Just to be clear, the rules we supply work on any Nginx setup. The only thing you need to ensure that's set correctly is how nginx passes over to php. Sometimes this is using what I've posted above, sometimes it's via sockets:
https://support.rackspace.com/how-to/install-nginx-and-php-fpm-running-on-unix-file-sockets/
Get it working with a basic PHP file, so you can load the site and see php working. Then add the script rules.
location ~ /api/v2/(.+)$ {
if (!-e $request_filename) { rewrite ^/api/v2/(.*) /api/v2/index.php?_page_url=$1 last; }
}
location ~ \.php$ {
if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }
}
location /files/ {
internal;
}
location /core/logs/ {
deny all;
}
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?_page_url=$1 last;
}
Please is this Nginx code correct?"An error accoured reaching the site to login, please tryAn error accoured reaching the site to login, please try"
for who have plesk in there sites:
Plesk>>
apache and nginx>>
Additional nginx directives:
NGINX:location ~ /api/v2/(.+)$ { if (!-e $request_filename) { rewrite ^/api/v2/(.*) /api/v2/index.php?_page_url=$1 last; } } location ~ \.php$ { if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; } } location /files/ { internal; } location /core/logs/ { deny all; } if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }