LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-11-2023, 10:46 PM   #1
xois
LQ Newbie
 
Registered: Dec 2023
Posts: 1

Rep: Reputation: 0
Question nginx server not working i opened the port 80 and checked config for nginx user, still not working


----------------------------------------------
SOLVED THE PROBLEM COMPILING NGINX FROM SOURCE
----------------------------------------------

hi, i'm not new to slackware i used it when it was 13.37, now i installed the slackware-current iso because i tried alpine linux and i didn't liked it, so i'm going back here.

this is the problem:
I installed from zero with ALL the packages and i used the nginx build for Slackware 15 from slackbuilds

my settings:
uname -a:

Code:
Linux xois.cl 6.6.6 #1 SMP PREEMPT_DYNAMIC Mon Dec 11 13:44:22 CST 2023 x86_64 Intel(R) Core(TM) i3-10100F CPU @ 3.60GHz GenuineIntel GNU/Linux
iptables -L:

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
nginx.conf:

Code:
user root;
worker_processes auto;
worker_rlimit_nofile 8192;
daemon off;

events {
  worker_connections 8000;

  multi_accept on;
  use epoll;
}

error_log  /var/log/nginx/error.log warn;

pid        /var/run/nginx.pid;

http {
  server_tokens off;
  include       /etc/nginx/mime.types;
  default_type  application/octet-stream;
  charset_types text/xml text/plain text/vnd.wap.wml application/x-javascript application/rss+xml text/css application/javascript application/json;
  log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                    '$status $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for"';

  keepalive_timeout 20;
  sendfile        on;
  tcp_nopush      on;
  tcp_nodelay     off;
  gzip on;
  gzip_http_version  1.0;
  gzip_comp_level    5;
  gzip_min_length    256;
  gzip_proxied       any;
  gzip_vary          on;
  gzip_types
    application/atom+xml
    application/javascript
    application/json
    application/rss+xml
    application/vnd.ms-fontobject
    application/x-font-ttf
    application/x-web-app-manifest+json
    application/xhtml+xml
    application/xml
    font/opentype
    image/svg+xml
    image/x-icon
    text/css
    text/plain
    text/x-component;

  include conf.d/*;
}
(tried root user since is the only one in my system)

curl localhost:

Code:
curl: (7) Failed to connect to localhost port 80 after 0 ms: Couldn't connect to server
chrome answer:

Code:
refused to connect.
i don't now what else could be important, thanks ( i love Slackware )
i'll try creating a user and testing again but i don't think is the problem...

----------------------------------------------
SOLVED THE PROBLEM COMPILING NGINX FROM SOURCE
----------------------------------------------

Last edited by xois; 12-11-2023 at 11:32 PM. Reason: Solved title
 
Old 12-12-2023, 03:14 AM   #2
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,445

Rep: Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196
It misses the server{} part:
Code:
server {
    listen 80 default_server;
...
...
}
in your nginx.conf
 
  


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
video works on vlc if opened in brower but does not works if opened in file manager DRAGSTER_TUNER Linux - Desktop 17 11-05-2018 04:34 AM
Network Bonding not working, I have checked in windows its working imran1983 Linux - Networking 2 11-03-2016 08:00 AM
how to identify the status of serial port ("Port Already Opened") from a C program rajmohan_tricom Linux - Software 3 02-07-2010 10:27 PM
grub error 17 cannot mount selected partition (past posts checked still deosn't work) jieyunfu Linux - General 1 05-06-2008 01:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:05 PM.

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