मैं अपना nginx सर्वर शुरू करने की कोशिश कर रहा हूं। जब मैं "$> /etc/init.d/nginx प्रारंभ" टाइप करता हूं, तो मेरे पास "nginx प्रारंभ करना" दिखाई देने वाला एक संदेश है, और तब कुछ भी नहीं होता है। कोई त्रुटि संदेश नहीं है, और जब मैं nginx की स्थिति की जांच करता हूं तो मुझे लगता है कि यह नहीं चल रहा है।Nginx कोई त्रुटि संदेश नहीं चल रहा
यहाँ मेरी /etc/nginx/nginx.conf फ़ाइल है:
server {
listen 80;
server_name technical-test.neo9.lan;
access_log /var/log/nginx/technical-test.neo9.lan.log main;
set $home /home/vincent;
location/{
alias $home/neo9/web/app/;
index index.html;
}
location /api/ {
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://localhost:1234;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
:
worker_processes 4;
daemon off;
error_log /home/vincent/tmp/nginx.log;
pid /home/vincent/tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /home/vincent/tmp/access.log main;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/site-enabled/*;
}
और यहाँ मेरी/etc/nginx/साइटों से उपलब्ध/डिफ़ॉल्ट फ़ाइल है
काम करेंगे आप सेवा nginx configtest' कोशिश की '? –
इस कमांड का उपयोग करके मुझे यह जवाब दें: "परीक्षण nginx विन्यास: nginx।" – user2618928
और "sudo nginx -t" मुझे देता है: nginx: कॉन्फ़िगरेशन फ़ाइल /etc/nginx/nginx.conf वाक्यविन्यास ठीक है nginx: कॉन्फ़िगरेशन फ़ाइल /etc/nginx/nginx.conf परीक्षण सफल है – user2618928