LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-05-2021, 10:17 AM   #1
NginxUser
LQ Newbie
 
Registered: Sep 2021
Posts: 5

Rep: Reputation: Disabled
Question Nginx not working


Hello, I'm running a nginx server on Linux Mint 20.2 Cinnamin. When I use Localhost it shows my webpage but when I connect to it through another computer it says it can't connect. Pls Help.
 
Old 09-05-2021, 10:53 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by NginxUser View Post
Hello, I'm running a nginx server on Linux Mint 20.2 Cinnamin. When I use Localhost it shows my webpage but when I connect to it through another computer it says it can't connect. Pls Help.
Please don't use text-speak; read the LQ Rules.

And although we know you're using nginx on Mint 20...we know nothing else. No web browser, other computer details, network details, what you're putting in on the other side, etc. What are you typing in on the other computer to try to access the web page? How are you accessing it on the local computer? Firewalls? SELinux? We need more details.
 
Old 09-05-2021, 12:38 PM   #3
NginxUser
LQ Newbie
 
Registered: Sep 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Angry

Hey, 1. Im not using text to speach, just in a hurry. 2. on the other end I'm using chrome os to acsses it with all firewalls down.
And The Linux pc is a Lenovo flex 3

Last edited by NginxUser; 09-05-2021 at 12:40 PM.
 
Old 09-05-2021, 01:36 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by NginxUser View Post
Hey, 1. Im not using text to speach, just in a hurry.
Not text to speech...text-speak. It's "Please" not 'pls'. Read the LQ Rules.
Quote:
2. on the other end I'm using chrome os to acsses it with all firewalls down. And The Linux pc is a Lenovo flex 3
Ok, so now we know it's Chrome...again, what browser? What are you typing in on that browser to try to access your server? What are you typing in on the local host to access it?

Again, without any sort of relevant information we can't even guess. We don't even know what (if any) messages you're getting on whatever browser you're trying to use.
 
Old 09-05-2021, 01:53 PM   #5
iPad
Member
 
Registered: Oct 2016
Distribution: iPadLinux
Posts: 81
Blog Entries: 1

Rep: Reputation: 45
The questioner needs: the Google keywords. What are they?

/r/linux4noobs would have worked infinitely better.

I didn't click on "View Post", to read the missing #2 & #4, sorry.

Last edited by iPad; 09-05-2021 at 01:55 PM.
 
Old 09-05-2021, 02:39 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by iPad View Post
The questioner needs: the Google keywords. What are they?
No, the questioner needs to provide the details. Anything as vague as "not working" has no chance of being answered.
Quote:
/r/linux4noobs would have worked infinitely better.
So why are you here, then?
Quote:
I didn't click on "View Post", to read the missing #2 & #4, sorry.
Perhaps if you did, you'd know what was going on, and the missing details. And as you've been told before, if you can't contribute to a thread, don't post. Saying they need Google keywords and saying post elsewhere doesn't help the OP or answer any questions. And admitting you don't have the facts or know what's been asked isn't good either.
 
Old 09-05-2021, 02:59 PM   #7
iPad
Member
 
Registered: Oct 2016
Distribution: iPadLinux
Posts: 81
Blog Entries: 1

Rep: Reputation: 45
Can anyone *else* help the questioner use Google?

I'll take a guess at the Google:
Quote:
nginx localhost works but other computers can't access
I did find the catb link: http://www.catb.org/~esr/faqs/smart-questions.html
But I don't know how to teach /r/linux4noobs to fix the UNdisplayed posts. Maybe someone else can.

Possibly the IP address is the problem, but that's a blind guess. Do you know ping?

I haven't made the effort to learn to get Mint text-to-speech working, so it's difficult for me to reply, especially without seeing any further info. I'm guessing the UNdisplayed posts are scaring the n00b away, so let's *wait* to see if the questioner ever comes back to LQ.
Quote:
...in a hurry...
They seem to only want the **instant** answers that Google provides. Best wishes. Bye.

Last edited by iPad; 09-05-2021 at 03:02 PM.
 
Old 09-05-2021, 03:21 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Either one or both of these two issues.

One is nat/pat to allow traffic between client and server.
Other tends to be configuration of server.

Would need some info on both.
 
Old 09-05-2021, 04:12 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by iPad View Post
Can anyone *else* help the questioner use Google? I'll take a guess at the Google:
Code:
nginx localhost works but other computers can't access
Did you bother to actually read any of those? They all indicate one or both of the things the OP has been asked about, and what jefro mentioned. And we can't help with either, since the OP hasn't provided any details.
Quote:
I did find the catb link: http://www.catb.org/~esr/faqs/smart-questions.html
Not hard to find, since it's in the posting signature of many here, along with having been given to you several times in the past.
Quote:
But I don't know how to teach /r/linux4noobs to fix the UNdisplayed posts. Maybe someone else can.
Perhaps, but since you're not making sense with that statement, we don't know.
Quote:
Possibly the IP address is the problem, but that's a blind guess. Do you know ping?
...and we're back to you asking the same kinds of questions the OP has been asked several times.
Quote:
I haven't made the effort to learn to get Mint text-to-speech working, so it's difficult for me to reply, especially without seeing any further info. I'm guessing the UNdisplayed posts are scaring the n00b away, so let's *wait* to see if the questioner ever comes back to LQ.
If the OP is scared of/unable to answer basic questions, there isn't much anyone can help them with. However, you still don't provide answers, do you?? Again, grow up with this passive-aggressive junk. Either contribute or don't. Don't keep telling people to use Google.
Quote:
They seem to only want the **instant** answers that Google provides. Best wishes. Bye.
And since they don't provide details, they won't get them there, either.
 
Old 09-05-2021, 04:21 PM   #10
NginxUser
LQ Newbie
 
Registered: Sep 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
So is this what you need? I am using it as a http server so i connect through http. here is my nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthentica...pachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}

Last edited by NginxUser; 09-05-2021 at 04:24 PM.
 
Old 09-05-2021, 05:15 PM   #11
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
I'm learning here... I think I see the same problem! (simply apt install nginx)

ufw 'inactive'. ping works. (MX; any Deb deriv maybe)

Code:
$ sudo tcpdump ip host 192.168.1.100 -nn
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
15:02:41.850267 IP 192.168.1.100.46512 > 192.168.1.74.80: Flags [S], seq 3592416560, win 29200, options [mss 1460,sackOK,TS val 1707372136 ecr 0,nop,wscale 4], length 0
15:02:41.850400 IP 192.168.1.74.80 > 192.168.1.100.46512: Flags [S.], seq 3053552155, ack 3592416561, win 65160, options [mss 1460,sackOK,TS val 3271480977 ecr 1707372136,nop,wscale 7], length 0
15:02:41.908035 IP 192.168.1.100.46512 > 192.168.1.74.80: Flags [.], ack 1, win 1825, options [nop,nop,TS val 1707372191 ecr 3271480977], length 0

(client telnet manually quit=aborted, or 'connection closed by foreign host', after 30 seconds)

15:03:16.060804 IP 192.168.1.100.46512 > 192.168.1.74.80: Flags [F.], seq 1, ack 1, win 1825, options [nop,nop,TS val 1707406347 ecr 3271480977], length 0
15:03:16.061177 IP 192.168.1.74.80 > 192.168.1.100.46512: Flags [F.], seq 1, ack 2, win 510, options [nop,nop,TS val 3271515188 ecr 1707406347], length 0
15:03:16.078343 IP 192.168.1.100.46512 > 192.168.1.74.80: Flags [.], ack 2, win 1825, options [nop,nop,TS val 1707406349 ecr 3271515188], length 0
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel
user@1005PE:/etc/nginx
$
Also happens to other listening port(s), where telnet localhost 111 connects.
**So, I'm guessing it's not nginx/pgm related.

Code:
$ sudo netstat -tpln | egrep '80|111'
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      24242/nginx: master 
tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd           
tcp6       0      0 :::80                   :::*                    LISTEN      24242/nginx: master
Is there some basic concept we're missing? (code-tag note to OP)

Last edited by GentleThotSeaMonkey; 09-05-2021 at 08:08 PM.
 
Old 09-05-2021, 05:36 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by NginxUser View Post
So is this what you need? I am using it as a http server so i connect through http.
No, it isn't, although it doesn't hurt. Again:
  • What are you typing in to the remote browser to try to access your machine??? As in, "http:// <WHAT???>"
  • What are you typing in to your local machine that DOES work?? "http://localhost"? "http://machine-name"? http://<IP address>"??
  • What browser are you using on Chrome OS?
  • What network are these machines connected to? Same network? Different? Internet? Work to home?
  • What message(s)/error(s) are you getting on the browser??? 404? 500? 503?? Anything????
  • Can you ping the IP address of your nginx machine from the Chrome OS system??
  • Can you access any OTHER network services (SSH, FTP, etc.) from the Chrome system.
If you're typing in "http://localhost" on Chrome, that's not going to work, neither is machine-name, unless you have it set up somewhere in a hosts file or local DNS somewhere. Again, these simple questions will let us try to help you. Again, there are a LOT of moving parts here, so looking for something simplistic on Google will pull up thousands of different things...all addressing different problems.

Please answer the simple questions asked several times now.
 
2 members found this post helpful.
Old 09-05-2021, 05:46 PM   #13
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
@GUru1: maybe my situation is same as low-info OP. Did *I* provide sufficient details?

:genuflect:


Added: ooops, tcpdump looks same on successful localhost https://termbin.com/m29k
so maybe I'm lost off in 'left-field' here...
(at least my debugging might be partly useful to someone someday)

p.s.: @NginxUser: can you collect the same:
sudo tcpdump -nnvv ip host <the IP of remote machine>

You can also try, from remote machine: telnet <NginxServer> 80 and enter: GET /
Does that *not* connect? (But does if done on localhost)

EDIT added AFTER #14 (since OP hasn't been back):
It was actually working, just no prompt!
Yup, I totally "fell off of left-field".

I disassembled my car engine, only to discover I hadn't heard it was running ok! Learned a lot tho.

"When the impossible is happening, it isn't". Again.

Last edited by GentleThotSeaMonkey; 09-05-2021 at 08:19 PM.
 
Old 09-05-2021, 06:58 PM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by GentleThotSeaMonkey View Post
@GUru1: maybe my situation is same as low-info OP. Did *I* provide sufficient details?
No idea who you're talking to, but if you have the same issue, you need to answer the same questions. If you're able to connect to localhost and pull up a web page, you know it's listening and working.

tcpdumps, wireshark, etc., are tools to use *AFTER* you do basic diagnostics and troubleshooting. Ping the machine; try a different service; describe the network. A machine on the same network/VLAN has a totally different set of issues than one that has to be NAT'ed at both ends, runs over the Internet, through firewalls, etc. As of yet, we don't know what they're seeing in the browser; for all we know, it's a 404 message because the web page is misspelled. Or they're keying the machine name in with no hosts entry. Could be incredibly simple or not...but unless you start with BASICS and go forward, it's 1000 times more difficult to diagnose.

Would you like to take your car to the mechanic and have them pull the engine out to 'diagnose' a noise, or would you want them to start it and just look and listen? Plug in the ODB scanner and read codes? Start simple, go from there.
Quote:
Added: ooops, tcpdump looks same on successful localhost https://termbin.com/m29k
so maybe I'm lost off in 'left-field' here... (at least my debugging might be partly useful to someone someday)

p.s.: @NginxUser: can you collect the same: sudo tcpdump -nnvv ip host <the IP of remote machine>

You can also try, from remote machine: telnet <NginxServer> 80 Does that *not* connect? (But does if done on localhost)
Again, a simple ping is all that's needed to verify basic connectivity. You don't need tcpdump to do that. Ping the box.

Last edited by TB0ne; 09-05-2021 at 07:00 PM.
 
2 members found this post helpful.
Old 09-05-2021, 09:32 PM   #15
NginxUser
LQ Newbie
 
Registered: Sep 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
1. http://<Ip Address>
2. http://localhost and http://ip-address
3. Chrome
4. Different and Internet
5. (Chrome error) ERR_ADDRESS_UNREACHABLE
6. How do I (I don't have Linux enabled and I can't)
7. And I don't have a server I can Connect to.

Last edited by NginxUser; 09-06-2021 at 09:44 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nginx/1.4.1 '/etc/nginx/sites-available/default' missing Jalalabee Linux - Newbie 0 06-05-2013 07:44 AM
nginx + php-fpm and nginx modules fantasygoat Linux - Server 0 06-09-2011 12:21 PM
LXer: Nginx+Varnish compared to Nginx LXer Syndicated Linux News 0 04-27-2011 02:30 PM
Nginx experts help me-problem when using Nginx php-fpm !!! HuMan-BiEnG Linux - Server 2 04-17-2011 02:30 PM
NGINX with PHP-FPM vis NGINX with Spawn-FCGI WhisperiN Linux - Server 1 03-15-2011 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration