No matter what I do, the httpd.pid file is created in the wrong location at runtime!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK, I'm just trying to learn about building Apache httpd. I am doing
what I thought was a basic build and packaging it as an rpm.

My process is:

./configure --prefix=/opt/apache --exec-prefix=/opt/apache
--localstatedir=/opt/apache/var --runstatedir=/opt/apache/var/run

make

make install

I have a systemd unit file that says:

[Unit]
Description=Apache Web Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/opt/apache/var/run/httpd.pid
ExecStart=/opt/apache/bin/apachectl start
ExecStop=/opt/apache/bin/apachectl graceful-stop
ExecReload=/opt/apache/bin/apachectl graceful
PrivateTmp=true
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

But every time I try to start httpd using the systemctl command, it
hangs for about 2 minutes then dies.

When I run /opt/apache/bin/httpd -S I get

VirtualHost configuration:
ServerRoot: "/opt/apache"
Main DocumentRoot: "/opt/apache/htdocs"
Main ErrorLog: "/opt/apache/var/logs/error_log"
Mutex default: dir="/opt/apache/var/logs/" mechanism=default
PidFile: "/opt/apache/var/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="daemon" id=2 not_used
Group: name="daemon" id=2 not_used

What am I doing wrong? I want the pid file to go in /opt/apache/var/run
not /opt/apache/var/logs. I am sure there's a configure argument I'm
doing wrong, but I can't find what it is.

Thanks!
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux