Skip to content

Commit b5aca1a

Browse files
committed
added rpm specs for vesta packages
1 parent d35e360 commit b5aca1a

File tree

7 files changed

+2403
-0
lines changed

7 files changed

+2403
-0
lines changed

src/rpm/conf/nginx.conf

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
user admin;
2+
worker_processes 1;
3+
error_log /usr/local/vesta/log/nginx-error.log;
4+
pid /var/run/vesta-nginx.pid;
5+
6+
events {
7+
worker_connections 128;
8+
use epoll;
9+
}
10+
11+
http {
12+
# Main settings
13+
sendfile on;
14+
tcp_nopush on;
15+
tcp_nodelay on;
16+
client_header_timeout 1m;
17+
client_body_timeout 1m;
18+
client_header_buffer_size 2k;
19+
client_body_buffer_size 256k;
20+
client_max_body_size 100m;
21+
large_client_header_buffers 4 8k;
22+
send_timeout 30;
23+
keepalive_timeout 60 60;
24+
reset_timedout_connection on;
25+
server_tokens off;
26+
server_name_in_redirect off;
27+
server_names_hash_max_size 512;
28+
server_names_hash_bucket_size 512;
29+
30+
31+
# Log format
32+
log_format main '$remote_addr - $remote_user [$time_local] $request '
33+
'"$status" $body_bytes_sent "$http_referer" '
34+
'"$http_user_agent" "$http_x_forwarded_for"';
35+
log_format bytes '$body_bytes_sent';
36+
access_log /dev/null main;
37+
38+
39+
# SSL PCI Compliance
40+
ssl_ciphers RC4:HIGH:!aNULL:!MD5:!kEDH;
41+
ssl_session_cache shared:SSL:10m;
42+
ssl_prefer_server_ciphers on;
43+
44+
45+
# Mime settings
46+
include /usr/local/vesta/nginx/conf/mime.types;
47+
default_type application/octet-stream;
48+
49+
50+
# Compression
51+
gzip on;
52+
gzip_comp_level 9;
53+
gzip_min_length 512;
54+
gzip_buffers 8 64k;
55+
gzip_types text/plain text/css text/javascript
56+
application/x-javascript;
57+
gzip_proxied any;
58+
59+
60+
# Proxy settings
61+
proxy_redirect off;
62+
proxy_set_header Host $host;
63+
proxy_set_header X-Real-IP $remote_addr;
64+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
65+
proxy_pass_header Set-Cookie;
66+
proxy_connect_timeout 90;
67+
proxy_send_timeout 90;
68+
proxy_read_timeout 90;
69+
proxy_buffers 32 4k;
70+
71+
72+
# Error pages
73+
error_page 403 /error/403.html;
74+
error_page 404 /error/404.html;
75+
error_page 502 503 504 /error/50x.html;
76+
77+
78+
# Vhost
79+
server {
80+
listen 8083;
81+
server_name _;
82+
root /usr/local/vesta/web;
83+
charset utf-8;
84+
85+
ssl on;
86+
ssl_certificate /usr/local/vesta/ssl/certificate.crt;
87+
ssl_certificate_key /usr/local/vesta/ssl/certificate.key;
88+
ssl_session_cache shared:SSL:10m;
89+
ssl_session_timeout 10m;
90+
91+
error_page 404 /error/index.html;
92+
error_page 403 /error/index.html;
93+
error_page 500 /error/index.html;
94+
95+
location / {
96+
expires max;
97+
index index.php;
98+
}
99+
100+
location /error/ {
101+
expires max;
102+
index index.html;
103+
}
104+
105+
location /rrd/ {
106+
expires off;
107+
}
108+
109+
location /backup/ {
110+
root /;
111+
internal;
112+
}
113+
114+
location ~ \.php$ {
115+
include /usr/local/vesta/nginx/conf/fastcgi_params;
116+
fastcgi_param SCRIPT_FILENAME /usr/local/vesta/web/$fastcgi_script_name;
117+
fastcgi_param QUERY_STRING $query_string;
118+
fastcgi_pass unix:/var/run/vesta-php.sock;
119+
fastcgi_intercept_errors on;
120+
break;
121+
}
122+
}
123+
}

0 commit comments

Comments
 (0)