mirror of https://github.com/dnomd343/kms-server
				
				
			
				 9 changed files with 10 additions and 104 deletions
			
			
		@ -1,4 +0,0 @@ | 
				
			|||||
/usr/sbin/php-fpm7 | 
					 | 
				
			||||
/usr/sbin/nginx | 
					 | 
				
			||||
echo "KMS-Server initialization completed." | 
					 | 
				
			||||
/usr/bin/vlmcsd -De | 
					 | 
				
			||||
@ -1,33 +0,0 @@ | 
				
			|||||
server { | 
					 | 
				
			||||
    listen 80; | 
					 | 
				
			||||
    listen [::]:80; | 
					 | 
				
			||||
    server_name kms.343.re; # 改为自己的域名 | 
					 | 
				
			||||
    location / { | 
					 | 
				
			||||
        if ($http_user_agent !~* (curl|wget)) { | 
					 | 
				
			||||
            return 301 https://$server_name$request_uri; | 
					 | 
				
			||||
        } | 
					 | 
				
			||||
        proxy_set_header Host $http_host; | 
					 | 
				
			||||
        proxy_pass http://127.0.0.1:1689; | 
					 | 
				
			||||
    } | 
					 | 
				
			||||
} | 
					 | 
				
			||||
 | 
					 | 
				
			||||
server { | 
					 | 
				
			||||
    listen 443 ssl http2; | 
					 | 
				
			||||
    listen [::]:443 ssl http2; | 
					 | 
				
			||||
    server_name kms.343.re; # 改为自己的域名 | 
					 | 
				
			||||
    ssl_certificate /etc/ssl/certs/343.re/fullchain.pem; # 改为自己的证书 | 
					 | 
				
			||||
    ssl_certificate_key /etc/ssl/certs/343.re/privkey.pem; | 
					 | 
				
			||||
     | 
					 | 
				
			||||
    gzip on; | 
					 | 
				
			||||
    gzip_buffers 32 4K; | 
					 | 
				
			||||
    gzip_comp_level 6; | 
					 | 
				
			||||
    gzip_min_length 100; | 
					 | 
				
			||||
    gzip_types application/javascript text/css text/xml; | 
					 | 
				
			||||
    gzip_disable "MSIE [1-6]\."; | 
					 | 
				
			||||
    gzip_vary on; | 
					 | 
				
			||||
 | 
					 | 
				
			||||
    location / { | 
					 | 
				
			||||
        proxy_set_header Host $http_host; | 
					 | 
				
			||||
        proxy_pass http://127.0.0.1:1689; | 
					 | 
				
			||||
    } | 
					 | 
				
			||||
} | 
					 | 
				
			||||
@ -1,51 +0,0 @@ | 
				
			|||||
server { | 
					 | 
				
			||||
    listen 80; | 
					 | 
				
			||||
    listen [::]:80; | 
					 | 
				
			||||
    server_name kms.343.re; # 改为自己的域名 | 
					 | 
				
			||||
    location / { | 
					 | 
				
			||||
        if ($http_user_agent !~* (curl|wget)) { | 
					 | 
				
			||||
            return 301 https://$server_name$request_uri; | 
					 | 
				
			||||
        } | 
					 | 
				
			||||
        proxy_set_header Host $http_host; | 
					 | 
				
			||||
        proxy_pass http://127.0.0.1:1689; | 
					 | 
				
			||||
    } | 
					 | 
				
			||||
} | 
					 | 
				
			||||
 | 
					 | 
				
			||||
server { | 
					 | 
				
			||||
    listen 443 ssl http2; | 
					 | 
				
			||||
    listen [::]:443 ssl http2; | 
					 | 
				
			||||
    server_name kms.343.re; # 改为自己的域名 | 
					 | 
				
			||||
    ssl_certificate /etc/ssl/certs/343.re/fullchain.pem; # 改为自己的证书 | 
					 | 
				
			||||
    ssl_certificate_key /etc/ssl/certs/343.re/privkey.pem; | 
					 | 
				
			||||
     | 
					 | 
				
			||||
    gzip on; | 
					 | 
				
			||||
    gzip_buffers 32 4K; | 
					 | 
				
			||||
    gzip_comp_level 6; | 
					 | 
				
			||||
    gzip_min_length 100; | 
					 | 
				
			||||
    gzip_types application/javascript text/css text/xml; | 
					 | 
				
			||||
    gzip_disable "MSIE [1-6]\."; | 
					 | 
				
			||||
    gzip_vary on; | 
					 | 
				
			||||
 | 
					 | 
				
			||||
    location / { | 
					 | 
				
			||||
        proxy_set_header Host $http_host; | 
					 | 
				
			||||
        proxy_pass http://127.0.0.1:1689; | 
					 | 
				
			||||
    } | 
					 | 
				
			||||
} | 
					 | 
				
			||||
 | 
					 | 
				
			||||
server { | 
					 | 
				
			||||
    listen 1689; | 
					 | 
				
			||||
    root /var/www/kms-server; | 
					 | 
				
			||||
 | 
					 | 
				
			||||
    location / { | 
					 | 
				
			||||
        set $query_param $query_string; | 
					 | 
				
			||||
        if ($http_user_agent ~* (curl|wget)) { | 
					 | 
				
			||||
            set $query_param $query_param&cli=true; | 
					 | 
				
			||||
        } | 
					 | 
				
			||||
        include fastcgi_params; | 
					 | 
				
			||||
        fastcgi_pass 127.0.0.1:9000; | 
					 | 
				
			||||
        fastcgi_param QUERY_STRING $query_param; | 
					 | 
				
			||||
        fastcgi_param SCRIPT_FILENAME /var/www/kms-server/backend/route.php; | 
					 | 
				
			||||
    } | 
					 | 
				
			||||
 | 
					 | 
				
			||||
    location /assets {} | 
					 | 
				
			||||
} | 
					 | 
				
			||||
@ -1,13 +0,0 @@ | 
				
			|||||
[Unit] | 
					 | 
				
			||||
Description=KMS Server By vlmcsd | 
					 | 
				
			||||
After=network.target | 
					 | 
				
			||||
 | 
					 | 
				
			||||
[Service] | 
					 | 
				
			||||
Type=forking | 
					 | 
				
			||||
PIDFile=/var/run/vlmcsd.pid | 
					 | 
				
			||||
ExecStart=/usr/bin/vlmcsd -p /var/run/vlmcsd.pid | 
					 | 
				
			||||
ExecStop=/bin/kill -HUP $MAINPID | 
					 | 
				
			||||
PrivateTmp=true | 
					 | 
				
			||||
 | 
					 | 
				
			||||
[Install] | 
					 | 
				
			||||
WantedBy=multi-user.target | 
					 | 
				
			||||
@ -0,0 +1,3 @@ | 
				
			|||||
 | 
					<?php | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					echo 'ok' . PHP_EOL; | 
				
			||||
					Loading…
					
					
				
		Reference in new issue