server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/v2ray/v2ray.crt;
ssl_certificate_key /etc/v2ray/v2ray.key;
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDH...-SHA384;
ssl_prefer_server_ciphers off;
server_name $HOSTNAME;
root /var/www/$HOSTNAME/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
location /ray {
proxy_redirect off;
proxy_pass http://127.0.0.1:10000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
# Show real IP in v2ray access.log
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
结果======================================
● v2ray.service - V2Ray Service
Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/v2ray.service.d
└─10-donot_touch_single_conf.conf
Active: failed (Result: exit-code) since Sat 2020-09-26 04:42:45 UTC; 5s ago
Docs: https://www.v2fly.org/
Process: 4094 ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json (code=exited, status=255/EXCEPTI>
Main PID: 4094 (code=exited, status=255/EXCEPTION)
Sep 26 04:42:45 seo....com systemd[1]: v2ray.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 26 04:42:45 seo....com systemd[1]: v2ray.service: Failed with result 'exit-code'.
Sep 26 04:42:45 seo....com systemd[1]: v2ray.service: Scheduled restart job, restart counter is at 5.
Sep 26 04:42:45 seo....com systemd[1]: Stopped V2Ray Service.
Sep 26 04:42:45 seo....com systemd[1]: v2ray.service: Start request repeated too quickly.
Sep 26 04:42:45 seo....com systemd[1]: v2ray.service: Failed with result 'exit-code'.
Sep 26 04:42:45 seo....com systemd[1]: Failed to start V2Ray Service.
Sep 26 04:42:50 seo....com systemd[1]: v2ray.service: Start request repeated too quickly.
Sep 26 04:42:50 seo....com systemd[1]: v2ray.service: Failed with result 'exit-code'.
Sep 26 04:42:50 seo....com systemd[1]: Failed to start V2Ray Service.
lines 1-19/19 (END)
日志 ====================================
run journalctl -xe
Sep 26 04:05:03 seo....com systemd[885]: Reached target Main User Target.
-- Subject: A start job for unit UNIT has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit UNIT has finished successfully.
--
-- The job identifier is 1.
Sep 26 04:05:03 seo....com systemd[885]: Startup finished in 96ms.
-- Subject: User manager start-up is now complete
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The user manager instance for user 1000 has been started. All services queued
-- for starting have been started. Note that other services might still be starting
-- up or be started at any later time.
--
-- Startup of the manager took 96882 microseconds.
Sep 26 04:05:19 seoul.sayhey.cyou sudo[991]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
Sep 26 04:05:26 seoul.sayhey.cyou sudo[991]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
config ===================
Nginx ===============================
日志 ==================================== run
journalctl -xe