43 lines
969 B
Bash
Executable File
43 lines
969 B
Bash
Executable File
sudo -u www-data etctracd -p 5544 --pidfile=/var/etctrac.5544 --protocol=http -s /var/www/html/etctrac --basic-auth="*,/etc/nginx/htaccess/etctrac,Restricted"
|
|
|
|
Install
|
|
mysql://etctrac:sojka123@localhost:3306/etctrac
|
|
|
|
|
|
CREATE DATABASE etctrac COLLATE = 'utf8mb4_bin';
|
|
grant all privileges on etctrac.* to etctrac@'localhost' identified by 'sojka123';
|
|
FLUSH PRIVILEGES;
|
|
|
|
|
|
|
|
nginx
|
|
server {
|
|
listen 443 ssl;
|
|
server_name etctrac.czech-tv.cz;
|
|
error_log /var/log/nginx/etctrac.log;
|
|
access_log /var/log/nginx/etctrac.log;
|
|
ssl_certificate /etc/nginx/cert/CT.crt;
|
|
ssl_certificate_key /etc/nginx/cert/CT.key;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:5544;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
if ($host = etctrac.czech-tv.cz) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
listen 80;
|
|
|
|
server_name etctrac.czech-tv.cz;
|
|
return 404;
|
|
|
|
}
|