
نوشته اصلی توسط
RealHAM
اگر با پورت ۸۰۸۰ درست نمایش داده می شود، مشکل شما از Nginx و ویچرال هاستهای شماست، بررسی کنید و ببنید ویچرال هاست درست ایجاد شدهاند یا نه
این فایل nginx.conf
کد:
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nobody;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 20480;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
open_file_cache max=5000 inactive=30s;
open_file_cache_valid 120s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
open_log_file_cache max=1024 inactive=30s min_uses=2;
server_names_hash_max_size 10240;
server_names_hash_bucket_size 1024;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
gzip on;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
gzip_proxied any;
gzip_http_version 1.1;
gzip_min_length 1000;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_types text/plain text/xml text/css application/x-javascript application/xml image/png image/x-icon image/gif image/jpeg application/xml+rss text/javascript application/atom+xml application/javascript application/json;
ignore_invalid_headers on;
client_header_timeout 3m;
client_body_timeout 3m;
client_max_body_size 200m;
send_timeout 3m;
connection_pool_size 256;
client_header_buffer_size 4k;
large_client_header_buffers 4 32k;
request_pool_size 4k;
output_buffers 4 32k;
postpone_output 1460;
*****_temp_path /tmp/nginx_temp;
log_format bytes_log "$msec $bytes_sent .";
}
این فایل site.ir.conf موجود در آدرس /etc/nginx/conf.d
کد:
server {
listen 138.201.212.201:80;
server_name site.ir www.site.ir;
access_log off;
error_log /var/log/virtualmin/site.ir_nginx_error_log crit;
location / {
*****_pass http://138.341.212.201:80;
}
location ~* ^.+.(gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mp3|jpg|jpeg|wmv|3gp|avi|mpg|mpeg|mp4|flv|mid|js|css|html|htm|wml)$ {
expires 30d;
root /home/firedrive/public_html;
}
location / {
client_max_body_size 10m;
client_body_buffer_size 128k;
*****_send_timeout 90;
*****_read_timeout 90;
*****_buffer_size 128k;
*****_buffers 4 256k;
*****_busy_buffers_size 256k;
*****_temp_file_write_size 256k;
*****_connect_timeout 30s;
*****_redirect https://www.site.ir:80 https://www.site.ir;
*****_redirect https://site.ir:80 https://site.ir;
*****_pass https://127.0.0.1:80/;
*****_set_header Host $host;
*****_set_header X-Real-IP $remote_addr;
*****_set_header X-Forwarded-For $*****_add_x_forwarded_for;
}
}
}