File samples/nginx.conf changed (mode: 100644) (index f73ece0..c4a7885) |
... |
... |
server { |
6 |
6 |
server_tokens off; |
server_tokens off; |
7 |
7 |
root /usr/share/rocketgit/root; |
root /usr/share/rocketgit/root; |
8 |
8 |
|
|
|
9 |
|
tcp_nopush on; |
|
10 |
|
sendfile on; |
|
11 |
|
|
9 |
12 |
# TODO - is ok in this context? |
# TODO - is ok in this context? |
10 |
13 |
client_max_body_size 1000m; |
client_max_body_size 1000m; |
11 |
14 |
# more than that is written into a file first |
# more than that is written into a file first |
|
... |
... |
server { |
36 |
39 |
} |
} |
37 |
40 |
|
|
38 |
41 |
location / { |
location / { |
39 |
|
gzip off; |
|
|
42 |
|
gzip on; |
|
43 |
|
#gzip_comp_level 6; |
|
44 |
|
gzip_types text/plain text/xml text/css text/javascript application/javascript application/x-javascript; |
40 |
45 |
|
|
41 |
46 |
# To be able to know that the client closed the connection |
# To be able to know that the client closed the connection |
42 |
47 |
# TODO: equivalent for apache? |
# TODO: equivalent for apache? |
|
... |
... |
server { |
51 |
56 |
include /etc/nginx/fastcgi_params; |
include /etc/nginx/fastcgi_params; |
52 |
57 |
fastcgi_param SCRIPT_FILENAME $document_root/index.php$fastcgi_script_name; |
fastcgi_param SCRIPT_FILENAME $document_root/index.php$fastcgi_script_name; |
53 |
58 |
|
|
54 |
|
fastcgi_pass unix:/run/php-fpm/rocketgit.sock; |
|
|
59 |
|
fastcgi_pass unix:/run/rocketgit-fpm/rocketgit.sock; |
55 |
60 |
} |
} |
56 |
61 |
} |
} |
57 |
62 |
|
|
|
... |
... |
server { |
63 |
68 |
server_tokens off; |
server_tokens off; |
64 |
69 |
root /usr/share/rocketgit/root; |
root /usr/share/rocketgit/root; |
65 |
70 |
|
|
66 |
|
# TODO - is ok in this context? |
|
|
71 |
|
tcp_nopush on; |
|
72 |
|
sendfile on; |
|
73 |
|
|
|
74 |
|
# TODO - is ok in this context? You can put 0 for no limit. |
67 |
75 |
client_max_body_size 1000m; |
client_max_body_size 1000m; |
68 |
76 |
# more than that is written into a file first |
# more than that is written into a file first |
69 |
77 |
client_body_buffer_size 128k; |
client_body_buffer_size 128k; |
|
... |
... |
server { |
94 |
102 |
} |
} |
95 |
103 |
|
|
96 |
104 |
location / { |
location / { |
97 |
|
gzip off; |
|
|
105 |
|
gzip on; |
|
106 |
|
#gzip_comp_level 6; |
|
107 |
|
gzip_types text/plain text/xml text/css text/javascript application/javascript application/x-javascript; |
98 |
108 |
|
|
99 |
109 |
# To be able to know that the client closed the connection |
# To be able to know that the client closed the connection |
100 |
110 |
# TODO: equivalent for apache? |
# TODO: equivalent for apache? |
|
... |
... |
server { |
109 |
119 |
include /etc/nginx/fastcgi_params; |
include /etc/nginx/fastcgi_params; |
110 |
120 |
fastcgi_param SCRIPT_FILENAME $document_root/index.php$fastcgi_script_name; |
fastcgi_param SCRIPT_FILENAME $document_root/index.php$fastcgi_script_name; |
111 |
121 |
|
|
112 |
|
fastcgi_pass unix:/run/php-fpm/rocketgit.sock; |
|
|
122 |
|
fastcgi_pass unix:/run/rocketgit-fpm/rocketgit.sock; |
113 |
123 |
} |
} |
114 |
124 |
|
|
115 |
125 |
ssl_certificate /etc/pki/tls/certs/localhost.crt; |
ssl_certificate /etc/pki/tls/certs/localhost.crt; |
|
... |
... |
server { |
119 |
129 |
# https://www.digicert.com/ssl-support/ssl-enabling-perfect-forward-secrecy.htm |
# https://www.digicert.com/ssl-support/ssl-enabling-perfect-forward-secrecy.htm |
120 |
130 |
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"; |
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"; |
121 |
131 |
ssl_protocols TLSv1.2; |
ssl_protocols TLSv1.2; |
122 |
|
ssl_session_cache shared:SSL:1m; |
|
123 |
|
ssl_session_timeout 5m; |
|
|
132 |
|
ssl_session_cache shared:SSL:10m; |
|
133 |
|
ssl_session_timeout 120m; |
124 |
134 |
|
|
125 |
135 |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning |
126 |
136 |
# To generate pin-sha256 string: openssl s_client -servername <server> -connect <server>:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 |
# To generate pin-sha256 string: openssl s_client -servername <server> -connect <server>:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 |
127 |
137 |
# add_header Public-Key-Pins "pin-sha256=\"base64+primary==\"; pin-sha256=\"base64+backup==\"; max-age=5184000; includeSubDomains; report-uri=\"https://www.example.org/hpkp-report\"" |
# add_header Public-Key-Pins "pin-sha256=\"base64+primary==\"; pin-sha256=\"base64+backup==\"; max-age=5184000; includeSubDomains; report-uri=\"https://www.example.org/hpkp-report\"" |
128 |
138 |
# add_header Public-Key-Pins-Report-Only ... # to not block users! |
# add_header Public-Key-Pins-Report-Only ... # to not block users! |
129 |
|
|
|
130 |
139 |
} |
} |
File samples/rg.conf changed (mode: 100644) (index 3fd84f1..a9bcdd8) |
65 |
65 |
DeflateBufferSize 81920 |
DeflateBufferSize 81920 |
66 |
66 |
|
|
67 |
67 |
<FilesMatch "\.php$"> |
<FilesMatch "\.php$"> |
68 |
|
SetHandler "proxy:unix:/run/php-fpm/rocketgit.sock|fcgi://localhost" |
|
|
68 |
|
SetHandler "proxy:unix:/run/rocketgit-fpm/rocketgit.sock|fcgi://localhost" |
69 |
69 |
</FilesMatch> |
</FilesMatch> |
70 |
70 |
</VirtualHost> |
</VirtualHost> |
71 |
71 |
|
|
|
91 |
91 |
#LogLevel rewrite:trace8 |
#LogLevel rewrite:trace8 |
92 |
92 |
|
|
93 |
93 |
# Allow .ico, 'themes' folder and robots.txt |
# Allow .ico, 'themes' folder and robots.txt |
94 |
|
RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt|\.well-known/.*)$ |
|
|
94 |
|
RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt|\.well-known/.*)$ [nocase] |
95 |
95 |
RewriteRule .* - [last] |
RewriteRule .* - [last] |
96 |
96 |
|
|
97 |
97 |
# Force the use of only one name even if we have more aliases. |
# Force the use of only one name even if we have more aliases. |
98 |
98 |
# https://httpd.apache.org/docs/2.4/rewrite/remapping.html |
# https://httpd.apache.org/docs/2.4/rewrite/remapping.html |
99 |
|
#RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}" |
|
100 |
|
#RewriteRule "^/?(.*)" "https://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape] |
|
|
99 |
|
#RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}" [nocase] |
|
100 |
|
#RewriteRule "^/?(.*)" "https://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape,nocase] |
101 |
101 |
|
|
102 |
102 |
# all rest |
# all rest |
103 |
103 |
RewriteRule (.*) /index.php [last] |
RewriteRule (.*) /index.php [last] |
|
151 |
151 |
DeflateBufferSize 81920 |
DeflateBufferSize 81920 |
152 |
152 |
|
|
153 |
153 |
<FilesMatch "\.php$"> |
<FilesMatch "\.php$"> |
154 |
|
SetHandler "proxy:unix:/run/php-fpm/rocketgit.sock|fcgi://localhost" |
|
|
154 |
|
SetHandler "proxy:unix:/run/rocketgit-fpm/rocketgit.sock|fcgi://localhost" |
155 |
155 |
</FilesMatch> |
</FilesMatch> |
156 |
156 |
</VirtualHost> |
</VirtualHost> |