קוד: |
systemctl status nginx nginx -t |
קוד: |
systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2018-05-23 11:34:57 UTC; 7s ago Docs: man:nginx(8) Process: 2342 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS) Process: 2326 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS) Process: 2348 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 2344 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 2349 (nginx) CGroup: /system.slice/nginx.service ├─2349 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ├─2350 nginx: worker process ├─2351 nginx: worker process ├─2352 nginx: worker process └─2353 nginx: worker process May 23 11:34:57 raspberrypi systemd[1]: Starting A high performance web server and a reverse proxy server... May 23 11:34:57 raspberrypi systemd[1]: Started A high performance web server and a reverse proxy server. |
קוד: |
sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful |
קוד: |
Unable to connect
Firefox can’t establish a connection to the server at localhost. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer’s network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web. |
קוד: |
sudo netstat -tanpl|grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 560/nginx: master p tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 560/nginx: master p tcp6 0 0 :::80 :::* LISTEN 560/nginx: master p |
קוד: |
sudo service php7.0-fpm status
● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2018-05-23 12:37:19 UTC; 1h 3min ago Docs: man:php-fpm7.0(8) Main PID: 415 (php-fpm7.0) Status: "Processes active: 0, idle: 2, Requests: 2, slow: 0, Traffic: 0req/sec" CGroup: /system.slice/php7.0-fpm.service ├─415 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf) ├─614 php-fpm: pool www └─615 php-fpm: pool www May 23 12:37:15 raspberrypi systemd[1]: Starting The PHP 7.0 FastCGI Process Manager... May 23 12:37:19 raspberrypi systemd[1]: Started The PHP 7.0 FastCGI Process Manager. |
קוד: |
# location / {
# try_files $uri $uri/ =404; # allow 192.168.1.0/24; # allow 127.0.0.1; # deny all; #} |
Anonymous : |
יש לי אתר ביתי שמורכב במערך הבא: PI3+nginx+drupal+raspbian
וכרגע אני לא יכול להתחבר לאתר בכלל - לא דרך הכתובת שלו ולא דרך IP מקומי. ניסיתי גם את כתובת HTTPS וגם HTTP. התחברתי דרך SSH ובדקתי את תוכן התיקיות הרלוונטיות ונראה שהכל בסדר. לא יודע אם זה קשור לבעיה הנוכחית, אבל במקרה הפעלתי את הפקודה: ngxtop top remote_addr שמראה איזה IP פנו לאתר, והכתובת האחרונה זוהתה מתורכיה - בדקתי עם האתר הבא: https://censys.io/ipv4/85.96.11.159 שמעתי שיש התקפות מתורכיה על אתרים ישראלים אז אולי.. אבל יכול להיות שגם עשיתי משהו בטעות.. בכל מקרה רציתי לדעת מאיפה להתחיל לבדוק מה מקור הבעיה? |
ציטוט: |
עניין קטן:
הכוונה שלך בכותרת היא לא לשאול אותנו אם אתה לא מצליח לגלוש לאתר הבייתי שלך. אין צורך בסימן השאלה. |
ציטוט: |
* אתה צריך לעשות port forwarding מהנתב שלך למחשב. |
Anonymous : | ||
elcuco,
בדקתי שוב ואכן אין גישה עם 127.0.0.1 - אני חושב שזה נובע מהקונפיג של nginx ששם לא אפשרתי את זה - הנה לדוגמא חלק מהקונפיג שמסומן כהערות (לא פעיל) ויתכן שאם הייתי מאפשר אז זה כן היה עובד:
לא יודע אם צריך את זה או לא. בכל מקרה localhost מהשרת עובד. לגבי הכתובת מ whatismyip - אני עובד עם האתר noip שנותן לי דומיין וגם שירות ddns. בראוטר הגדרתי DDNS דרך החשבון שלי ב noip. כרגע אם אני מנסה לגלוש עם ה IP החיצוני שנותן לי whatismyip אין גישה אבל אולי זה כך צריך להיות... מה שיותר הטריד אותי שלא יכולתי לגשת לאתר עם IP המקומי של השרת, אבל זה כנראה נובע מהגדרות nginx כפי שהצגתי לעיל תודה |
ציטוט: |
בטל IPv6 ובדוק שוב. |
קוד: |
Append IPV6_DISABLE=1 to the GRUB_CMDLINE_LINUX variable in /etc/default/grub. |
קוד: |
sudo ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255 ether b8:27:eb:e3:42:2b txqueuelen 1000 (Ethernet) RX packets 736 bytes 481009 (469.7 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 606 bytes 77262 (75.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 1000 (Local Loopback) RX packets 19 bytes 2530 (2.4 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 19 bytes 2530 (2.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether b8:27:eb:b6:17:7e txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
קוד: |
netstat -an
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN tcp 0 172 192.168.1.4:22 192.168.1.6:34464 ESTABLISHED tcp6 0 0 :::80 :::* LISTEN udp 0 0 0.0.0.0:68 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 0.0.0.0:5353 0.0.0.0:* udp 0 0 0.0.0.0:51029 0.0.0.0:* udp6 0 0 :::44521 :::* udp6 0 0 :::5353 :::* raw6 0 0 :::58 :::* 7 |
Anonymous : |
כשאני מנסה עם 192.168.1.4 הדפדפן הופך את זה ל https://localhost אבל על https מופיע קוו מחיקה ויש במסך הודעה: Your connection is not private. נראה שקשור ל SSL שיש לי בפורט 443..
|
חתול : | ||
אתה לא יכול ליצור תעודת SSL לכתובת מקומית, רק לדומיין אמיתי. |
קוד: |
192.168.1.4
192.168.1.4 HTTP - TCP Any -> 80 Active 192.168.1.4 192.168.1.4 HTTPS - TCP Any -> 443 Active |
Anonymous : |
נראה שיש כאן אי הבנה בינינו..לא אמרתי שיצרתי חותמת לכתובת IP -
את החותמת של SSL יצרתי עבור הדומיין שלי וזה עובד יפה, כלומר כשמתחברים מבחוץ לאתר מתקבל חיבור מאובטח עם המנעול הירוק. |
Anonymous : |
נראה שיש כאן אי הבנה בינינו..לא אמרתי שיצרתי חותמת לכתובת IP -
את החותמת של SSL יצרתי עבור הדומיין שלי וזה עובד יפה, |
Anonymous : |
ומדוע לא יכולתי לתקשר עם האתר גם באמצעות כתובת מקומית ב LAN? |