Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Nginx server running but not work. [+Magento, varnish and nginx]

$
0
0
Hi, i have a problem, in my link server i'nst work
http://50.116.109.106:8086/
(yeah i have a change port 2 times, first to 8080 now to 8086, the website with magento store dont appears, dont work. i no have idea do to do for solution
nginx version: nginx/1.6.0
magento version 1.9.0.1
The server is configured for: Varnish run in port 80, magento with nginx 8086, with nginx page_speed (ngx_pagespeed-1.8.31.4-beta), but i dont have a succes with this,

NGINX.CONF

user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
types_hash_bucket_size 64;
server_names_hash_bucket_size 128;
#access_log logs/access.log main;

log_format varnish_log '$http_x_forwarded_for - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent "$http_referer" ' '"$http_user_agent"' ;

pagespeed on;
# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/ngx_pagespeed_cache;

sendfile on;
autoindex off;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
map $scheme $fastcgi_https { ## Detect when HTTPS is used
default off;
https on;
}

keepalive_timeout 65;

gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*;
include /etc/nginx/sites-enabled/*;

map $scheme $fastcgi_https {
defaulf off;
https on;
}


}
====================================
AND (DEFAULT_HOST.conf)

server {
listen *:8086 default_server;
server_name 50.116.109.106:8086;

error_log /var/log/nginx/site-error.log warn;
access_log /var/log/nginx/site-access.log;
include ngx_pagespeed;
#include=/etc/php-fpm.d/*.conf

pagespeed on;
# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/ngx_pagespeed_cache;

location / {
root /home/popipe/public_html/;
index index.html index.php;
}

# Ensure requests for pagespeed optimized resources go to the pagespeed
# handler and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; }
location ~ "^/ngx_pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
location /pagespeed_console { allow 127.0.0.1; deny all; }

pagespeed DisableRewriteOnNoTransform off;
pagespeed ModifyCachingHeaders off;
pagespeed EnableFilters rewrite_images;
pagespeed EnableFilters recompress_images;
pagespeed EnableFilters convert_jpeg_to_progressive;
pagespeed EnableFilters recompress_jpeg;
pagespeed EnableFilters recompress_png;
pagespeed EnableFilters recompress_webp;
pagespeed EnableFilters strip_image_meta_data;
pagespeed EnableFilters jpeg_subsampling;
pagespeed EnableFilters resize_images;
pagespeed ProgressiveJpegMinBytes min_bytes;

# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
#end configuration for pagespeed optimized images

location / {
try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
expires 30d; ## Assume all files are cachable
}

## These locations would be hidden by .htaccess normally
location ^~ /app/ { deny all; }
location ^~ /includes/ { deny all; }
location ^~ /lib/ { deny all; }
location ^~ /media/downloadable/ { deny all; }
location ^~ /pkginfo/ { deny all; }
location ^~ /report/config.xml { deny all; }
location ^~ /var/ { deny all; }

location /var/export/ { ## Allow admins only to view export folder
auth_basic "Restricted"; ## Message shown in login window
auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
autoindex on;
}

location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
access_log off;
log_not_found off;
expires 360d;
}

location /. { ## Disable .htaccess and other hidden files
return 404;
}

location @handler { ## Magento uses a common front handler
rewrite / /index.php;
}

location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
rewrite ^(.*.php)/ $1 last;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
# Pass PHP scripts to PHP-FPM
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9001;
fastcgi_param SCRIPT_FILENAME $/etc/nginx/$fastcgi_script_name;
include /etc/nginx/fastcgi_params;

fastcgi_param MAGE_RUN_CODE default;
fastcgi_param MAGE_RUN_TYPE store;
}

rewrite ^/minify/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last;
rewrite ^/skin/m/([0-9]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1 last;

location /lib/minify/ {
allow all;
}
gzip on;
#gzip_comp_level 9;
gzip_min_length 1000;
gzip_proxied any;
gzip_types text/plain application/xml text/css text/js application/x-javascript;

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
}
==========================================================
My firewall in server already opened this port 8080 and 8086 and 80, but solution is not work

I wait for help, please
thanks for all

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>