I am using Apache web server and I am testing my application using Apache benchmark (a tool to hit the http request concurrently), When I use till 300 concurrent requests it is succeeding but when It crosses 300. few requests are failing with SSL handshake failed (5). I understand that Apache web server has 256 request limitation, So I increased the MaxRequestWorkers to 1000 still I get the SSL handshake failure error for few request.
Could someone please check this configuration and let me know the issue in my environment.
Configuration of Apache server:
1) httpd version,
# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Oct 19 2017 20:39:16
2) I checked the status using the following command,
# systemctl status httpd -l
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-03-07 23:46:32 IST; 1min 55s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 4351 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Main PID: 4359 (httpd)
Status: "Total requests: 264; Current requests/sec: 0.1; Current traffic: 204 B/sec"
CGroup: /system.slice/httpd.service
├─4359 /usr/sbin/httpd -DFOREGROUND
├─4360 /usr/sbin/httpd -DFOREGROUND
├─4362 /usr/sbin/httpd -DFOREGROUND
├─5100 /usr/sbin/httpd -DFOREGROUND
├─5386 /usr/sbin/httpd -DFOREGROUND
├─5415 /usr/sbin/httpd -DFOREGROUND
└─5416 /usr/sbin/httpd -DFOREGROUND
3) Since the httpd is pointing to the path : /usr/lib/systemd/system/httpd.service
vi /usr/lib/systemd/system/httpd.service
[Unit]
Description=The Apache HTTP Server
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/httpd
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful
ExecStop=/bin/kill -WINCH ${MAINPID}
# We want systemd to give httpd some time to finish gracefully, but still want
# it to kill httpd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
# httpd time to finish.
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target
4) As per the above command I found the env file is available '/etc/sysconfig/httpd'
vi /etc/sysconfig/httpd
#
# This file can be used to set additional environment variables for
# the httpd process, or pass additional options to the httpd
# executable.
#
# Note: With previous versions of httpd, the MPM could be changed by
# editing an "HTTPD" variable here. With the current version, that
# variable is now ignored. The MPM is a loadable module, and the
# choice of MPM can be changed by editing the configuration file
/etc/httpd/conf.modules.d/00-mpm.conf
#
#
# To pass additional options (for instance, -D definitions) to the
# httpd binary at startup, set OPTIONS here.
#
#OPTIONS=
#
# This setting ensures the httpd process is started in the "C" locale
# by default. (Some modules will not behave correctly if
# case-sensitive string comparisons are performed in a different
# locale.)
#
LANG=C
5) As per the above command, I found that the conf fileis available in the path : /etc/httpd/conf.modules.d/00-mpm.conf
vi /etc/httpd/conf.modules.d/00-mpm.conf
# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:
# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
LoadModule mpm_worker_module modules/mod_mpm_worker.so
# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
#LoadModule mpm_event_module modules/mod_mpm_event.so
<IfModule mpm_worker_module>
ServerLimit 1000
MaxRequestWorkers 1000
</IfModule>
What is wrong with my Apache configuration? Why it is not serving 1000 concurrent request? How to achieve more concurrent request in Apache web server?
Related
Rails: 6.0.3
Sidekiq: 6.1.2
Ruby 2.7.2
Running on AWS Amazon Linux 2
I'm running a fairly simply Sidekiq configuration on production, and using the boilerplate systemd/sidekiq.service file from the examples directory in the sidekiq repo.
I noticed that my workers can not run long jobs because they are killed every 1 minute or so. I was able to track down what's happening, and it appears that systemd is restarting sidekiq, even though it is successfully started. It appears that it never receives the message that the service started successfully, so systemd is killing the process.
Here are the logs:
sidekiq: 2021-06-01T23:30:56.510Z pid=24939 tid=gir INFO: Shutting down
sidekiq: 2021-06-01T23:30:56.511Z pid=24939 tid=4jxb INFO: Scheduler exiting...
systemd: Failed to start sidekiq.
systemd: Unit sidekiq.service entered failed state.
systemd: sidekiq.service failed.
sidekiq: 2021-06-01T23:30:56.513Z pid=24939 tid=gir INFO: Terminating quiet workers
sidekiq: 2021-06-01T23:30:56.513Z pid=24939 tid=4jvn INFO: Scheduler exiting...
sidekiq: 2021-06-01T23:30:57.015Z pid=24939 tid=gir INFO: Pausing to allow workers to finish...
sidekiq: 2021-06-01T23:30:57.516Z pid=24939 tid=gir INFO: Bye!
systemd: sidekiq.service holdoff time over, scheduling restart.
systemd: Starting sidekiq...
sidekiq: 2021-06-01T23:30:58.991Z pid=32046 tid=fs6 INFO: Enabling systemd notification integration
sidekiq: 2021-06-01T23:31:04.475Z pid=32046 tid=fs6 INFO: Booting Sidekiq 6.1.2 with redis options {:url=>"redis://******"}
sidekiq: 2021-06-01T23:31:08.869Z pid=32046 tid=fs6 INFO: Running in ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
sidekiq: 2021-06-01T23:31:08.870Z pid=32046 tid=fs6 INFO: See LICENSE and the LGPL-3.0 for licensing details.
systemd: sidekiq.service: Got notification message from PID 32046, but reception only permitted for main PID 31981
Following these messages, the sidekiq worker will successfully perform the jobs from the queue for about 1 minute before it's restarted again. This cycle continues forever.
I've tried modifying the sidekiq.service file a number of different ways, but nothing seems to do the trick. In particular, this line from the logs seems to indicate there's an issue sending the signal to the right process ID, that sidekiq correctly started up: systemd: sidekiq.service: Got notification message from PID 32046, but reception only permitted for main PID 31981
Any ideas on how I can ensure that systemd accurately knows when a job succeeds/fails to start?
Here is my current systemd/sidekiq.service file:
#
# This file tells systemd how to run Sidekiq as a 24/7 long-running daemon.
#
# Customize this file based on your bundler location, app directory, etc.
# Customize and copy this into /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu).
# Then run:
# - systemctl enable sidekiq
# - systemctl {start,stop,restart} sidekiq
#
# This file corresponds to a single Sidekiq process. Add multiple copies
# to run multiple processes (sidekiq-1, sidekiq-2, etc).
#
# Use `journalctl -u sidekiq -rn 100` to view the last 100 lines of log output.
#
[Unit]
Description=sidekiq
# start us only once the network and logging subsystems are available,
# consider adding redis-server.service if Redis is local and systemd-managed.
After=syslog.target network.target
# See these pages for lots of options:
#
# https://www.freedesktop.org/software/systemd/man/systemd.service.html
# https://www.freedesktop.org/software/systemd/man/systemd.exec.html
#
# THOSE PAGES ARE CRITICAL FOR ANY LINUX DEVOPS WORK; read them multiple
# times! systemd is a critical tool for all developers to know and understand.
#
[Service]
#
# !!!! !!!! !!!!
#
# As of v6.0.6, Sidekiq automatically supports systemd's `Type=notify` and watchdog service
# monitoring. If you are using an earlier version of Sidekiq, change this to `Type=simple`
# and remove the `WatchdogSec` line.
#
# !!!! !!!! !!!!
#
Type=simple
# If your Sidekiq process locks up, systemd's watchdog will restart it within seconds.
#WatchdogSec=10
EnvironmentFile=/opt/elasticbeanstalk/deployment/custom_env_var
WorkingDirectory=/var/app/current
# If you use rbenv:
# ExecStart=/bin/bash -lc 'exec /home/deploy/.rbenv/shims/bundle exec sidekiq -e production'
# If you use the system's ruby:
# ExecStart=/usr/local/bin/bundle exec sidekiq -e production
# If you use rvm in production without gemset and your ruby version is 2.6.5
# ExecStart=/home/deploy/.rvm/gems/ruby-2.6.5/wrappers/bundle exec sidekiq -e production
# If you use rvm in production wit gemset and your ruby version is 2.6.5
ExecStart=/bin/bash -lc 'cd /var/app/current; bundle exec sidekiq -e production -r /var/app/current -C /var/app/current/config/sidekiq.yml'
# Use `systemctl kill -s TSTP sidekiq` to quiet the Sidekiq process
# !!! Change this to your deploy user account !!!
User=root
Group=root
UMask=0002
# Greatly reduce Ruby memory fragmentation and heap usage
# https://www.mikeperham.com/2018/04/25/taming-rails-memory-bloat/
Environment=MALLOC_ARENA_MAX=2
# if we crash, restart
RestartSec=1
Restart=on-failure
# output goes to /var/log/syslog (Ubuntu) or /var/log/messages (CentOS)
StandardOutput=syslog
StandardError=syslog
# This will default to "bundler" if we don't specify it
SyslogIdentifier=sidekiq
[Install]
WantedBy=multi-user.target
Change ExecStart to:
ExecStart=/direct/path/to/bundle exec sidekiq -e production
Everything else in that line appears superfluous.
Maybe this work in your case:
Type=notify
Notify=all # or "exec"
I am trying to host a website via nginx on Amazon AWS EC2 Ubuntu 18.04. I started by following this tutorial. I ran sudo apt update and sudo apt install nginx. Then, I ran sudo ufw allow 'Nginx HTTP'. Running sudo ufw status returned the following;
Status: active
To Action From
-- ------ ----
Nginx HTTP ALLOW Anywhere
OpenSSH ALLOW Anywhere
Nginx HTTP (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
After that I ran systemctl status nginx which returned:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
Docs: man:nginx(8)
Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code
Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
Main PID: 2661 (nginx)
Tasks: 2 (limit: 1152)
CGroup: /system.slice/nginx.service
├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_pro
└─2663 nginx: worker process
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web serv
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID f
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web serve
lines 1-15/15 (END)...skipping...
● 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 Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
Docs: man:nginx(8)
Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 2661 (nginx)
Tasks: 2 (limit: 1152)
CGroup: /system.slice/nginx.service
├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─2663 nginx: worker process
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.
I then tried to fix the Failed to parse PID from file /run/nginx.pid: Invalid argument error. I did that by doing mkdir /etc/systemd/system/nginx.service.d, then printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" which returned
[Service]
ExecStartPost=/bin/sleep 0.1
After that I ran sudo nano /etc/systemd/system/nginx.service.d/override.conf and inserted the above quote into there and saved it. Then sudo systemctl daemon-reload and sudo systemctl restart nginx. After that running systemctl status nginx returned this:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/nginx.service.d
└─override.conf
Active: active (running) since Thu 2019-03-21 14:54:44 UTC; 16s ago
Docs: man:nginx(8)
Process: 2941 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 2957 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
Process: 2955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 2944 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 2956 (nginx)
Tasks: 2 (limit: 1152)
CGroup: /system.slice/nginx.service
├─2956 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─2962 nginx: worker process
Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Stopped A high performance web server and a reverse proxy server.
Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.
I figured everything should be working now, so I ran curl localhost and that returned
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
nginx.org.<br/>
Commercial support is available at
nginx.com.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
I believe I should also be able to access this from my home PC, so I did curl ifconfig.me to get my public IP and then I went to http://PUBLICIP, but it said This site can’t be reached.
Can someone help me fix this please?
Thanks.
Problem was my AWS security groups, I added an inbound rule to accept all TCP and now it works.
I'm having some trouble launching my Apache server from RHEL 7 (Amazon ec2). My larger goal is to host a Flask application from the ec2 instance using an Anaconda environment, but right now I'm just concerned with getting the httpd service started properly.
I've found a number of similar questions posted here, here, here, etc., but none seem to address the exact problem I'm experiencing.
I'm following this tutorial down to the last > character, but the commands
sudo apachectl restart
and
sudo service httpd restart
both result in errors and direct me to examine systemctl status httpd.service for more information. The output of that file is as follows:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-04-06 21:00:42 UTC; 4s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 32166 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 32165 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 32165 (code=exited, status=0/SUCCESS)
[long ec2 ip address] systemd[1]: Starting The Apache HTTP Server...
[long ec2 ip address] httpd[32165]: httpd (pid 28220) already running
[long ec2 ip address] kill[32166]: kill: cannot find process ""
[long ec2 ip address] systemd[1]: httpd.service: control process exited, code=exited status=1
[long ec2 ip address] systemd[1]: Failed to start The Apache HTTP Server.
[long ec2 ip address] systemd[1]: Unit httpd.service entered failed state.
[long ec2 ip address] systemd[1]: httpd.service failed.
The output of journalctl -xe returns the same.
Some information about my system (don't know whether or not any of this will be helpful, but I figured it would be best to include it):
Apache Version: Apache/2.4.6 (Red Hat Enterprise Linux) configured
$ /usr/bin/python -V
Python 2.7.5
$ sudo yum install mod_wsgi
Package mod_wsgi-3.4-12.el7_0.x86_64 already installed and latest version
$ service httpd configtest
Syntax OK
$ sudo chkconfig --levels 235 httpd on
Note: Forwarding request to 'systemctl enable httpd.service'
The command sudo netstat -lnp | grep :80 returns tcp 0 0 :::0 :::* LISTEN 28220/httpd
I am now noticing that the file /etc/init.d/httpd does not exist.
Anybody have a hint? If this question has been asked before, please direct me to it. I've searched all over, with no luck thus far.
Cheers.
Try killing the old pid. Looks like something is still running under httpd. Try doing a ps -ef | grep httpd to see what is running and kill it using sudo kill -9 processid (e.g. sudo kill -9 13254).
I have two problems running freeswitch from systemd :
EDIT 2 - I have moved the slow start up question to here (Freeswitch pauses on check_ip at boot on centos 7.1) as although they may be related it's probably good as a standalone.
EDIT - I have noticed something else. Look at these next lines captured from the terminal output when running it from there. The gap is 4 minutes but it has been around 10 minutes before. I noticed it because I was trying to find out why port 8021 was taking several minutes to accept the fs_cli connection. Why does this happen? Never happened to me before and I've installed loads of FS boxes. This does the same thing on both 1.7 & todays 1.6.
2015-10-23 12:57:35.280984 [DEBUG] switch_scheduler.c:249 Added task 1 heartbeat (core) to run at 1445601455
2015-10-23 12:57:35.281046 [DEBUG] switch_scheduler.c:249 Added task 2 check_ip (core) to run at 1445601455
2015-10-23 13:01:31.100892 [NOTICE] switch_core.c:1386 Created ip list rfc6598.auto default (deny)
I sometimes get double processes started. Here is my status line after such an occurrence :
# systemctl status freeswitch -l
freeswitch.service - freeswitch
Loaded: loaded (/etc/systemd/system/multi-user.target.wants/freeswitch.service)
Active: activating (start) since Fri 2015-10-23 01:31:53 BST; 18s ago
Main PID: 2571 (code=exited, status=0/SUCCESS); : 2742 (freeswitch)
CGroup: /system.slice/freeswitch.service
├─usr/bin/freeswitch -ncwait -core -db /dev/shm -log /usr/local/freeswitch/log -conf /usr/local/freeswitch/conf -run /usr/local/freeswitch/run
└─usr/bin/freeswitch -ncwait -core -db /dev/shm -log /usr/local/freeswitch/log -conf /usr/local/freeswitch/conf -run /usr/local/freeswitch/run
Oct 23 01:31:53 fswitch-1 systemd[1]: Starting freeswitch...
Oct 23 01:31:53 fswitch-1 freeswitch[2742]: 2743 Backgrounding.
and there are two processes running.
The PID file is sometimes not written fast enough for the systemd process to pick it up, but by the time I see this (no matter how fast I run the command) it's always there by the time I do :
Oct 23 02:00:26 arribacom-sbc-1 systemd[1]: PID file
/usr/local/freeswitch/run/freeswitch.pid not readable (yet?) after
start.
Now, in (2) everything seems to work ok, and I can shut down the freeswitch process using
systemctl stop freeswitch
without any issues, but in (1) it just doesn't seem to do anything.
I'm wondering if the two are related, and that freeswitch is reporting back to systemd that the program is running before it actually is. Then systemd is either starting up another process or (sometimes) not.
Can anyone offer any pointers? I have tried to mail the freeswitch users list but despite being registered I simply cannot get any emails to appear on the list (but that's another problem).
* Update *
If I remove the -ncwait it seems to improve the double process starting but I still get the can't read PID warning, so I'm still sure there's an issue present, possibly around timing(?).
I'm on Centos 7.1, & my freeswitch version is
FreeSWITCH Version 1.7.0+git~20151021T165609Z~9fee9bc613~64bit (git
9fee9bc 2015-10-21 16:56:09Z 64bit)
and here's my freeswitch.service file (some things have been commented out until I understand what they are doing and any side effects they may have) :
[Unit]
Description=freeswitch
After=syslog.target network.target
#
[Service]
Type=forking
PIDFile=/usr/local/freeswitch/run/freeswitch.pid
PermissionsStartOnly=true
ExecStart=/usr/bin/freeswitch -nc -core -db /dev/shm -log /usr/local/freeswitch/log -conf /u
ExecReload=/usr/bin/kill -HUP $MAINPID
#ExecStop=/usr/bin/freeswitch -stop
TimeoutSec=120s
#
WorkingDirectory=/usr/bin
User=freeswitch
Group=freeswitch
LimitCORE=infinity
LimitNOFILE=999999
LimitNPROC=60000
LimitSTACK=245760
LimitRTPRIO=infinity
LimitRTTIME=7000000
#IOSchedulingClass=realtime
#IOSchedulingPriority=2
#CPUSchedulingPolicy=rr
#CPUSchedulingPriority=89
#UMask=0007
#
[Install]
WantedBy=multi-user.target
In the current master branch, take the two files from debian/ directory:
freeswitch-systemd.freeswitch.service -- should go as /lib/systemd/system/freeswitch.service
freeswitch-systemd.freeswitch.tmpfile -- should go as /usr/lib/tmpfiles.d/freeswitch.conf
You probably need to adapt the paths, or build FreeSWITCH to use standard Debian paths.
I tried to set up nginx on a brand new fedora box on DigitalOcean. These are my steps
$ yum install nginx
$ systemctl enable nginx
$ systemctl restart nginx
However, it doesn't seem to work. I get the following output when running systemctl status nginx
[root#inspiredev ~]# systemctl status nginx -l
nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
Active: active (running) since Fri 2014-11-07 14:26:33 EST; 1s ago
Process: 958 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=1/FAILURE)
Process: 967 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
Process: 966 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
Main PID: 970 (nginx)
CGroup: /system.slice/nginx.service
├─970 nginx: master process /usr/sbin/ngin
└─971 nginx: worker proces
Nov 07 14:26:33 inspiredev systemd[1]: Starting The nginx HTTP and reverse proxy server...
Nov 07 14:26:33 inspiredev nginx[966]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Nov 07 14:26:33 inspiredev nginx[966]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Nov 07 14:26:33 inspiredev systemd[1]: Failed to read PID from file /run/nginx.pid: Invalid argument
Nov 07 14:26:33 inspiredev systemd[1]: Started The nginx HTTP and reverse proxy server.
I can't seem to figure out or where I went wrong. It'd be great if someone can help with this.
EDIT: When I go to the box's IP address, I got nothing, which is why I feel like something is not working right.
From the systemd logs, nginx service appears to be running. (the warning about the pid file not found seems endemic to many distributions).
On fedora 19/20 (systemd based), open the firewall with the following commands:
firewall-cmd --permanent --zone=public --add-service=http
systemctl restart firewalld.service
or alternatively:
firewall-cmd --permanent --zone=public --add-port=80/tcp
systemctl restart firewalld.service
The second version syntax lets you open any port/protocol combination.