You are not logged in.
Pages: 1
Topic closed
I've tried since yesterday to get the httpd.service to run at system boot. With no luck!
I installed Arch yesterday, and I had big trouble getting GDM to autostart, but I eventually got it working.
Sadly then I have the same problems, again. This time with the httpd service.
I tried the wiki about Apache with no luck.
I did not use rc.d - I used systemd:
systemctl enable httpd.service
which didn't produce any errors. nor output at all.
Also this command works, so I don't think it's the httpd service that have a problem.
systemctl enable httpd.service
Any idea's ?
Last edited by Jobbe (2012-10-19 23:04:17)
Offline
Please change your thread title to something that actually describes your problem
https://wiki.archlinux.org/index.php/Fo … ow_to_Post
Offline
Create a httpd.service file in /etc/systemd/system/
[Unit]
Description=Apache Webserver
After=network.target
[Service]
Type=forking
EnvironmentFile=/etc/conf.d/apache
ExecStart=/usr/sbin/httpd -k start $OPTIONS
ExecStop=/usr/sbin/httpd -k graceful-stop $OPTIONS
ExecReload=/usr/sbin/httpd -k graceful $OPTIONS
Restart=always
[Install]
WantedBy=multi-user.target
After created run
systemctl daemon-reload
Offline
I know you stated that you installed yesterday, which likely means you are using systemd, but I just want to make sure.... you are using systemd right?
Offline
Please change your thread title to something that actually describes your problem
https://wiki.archlinux.org/index.php/Fo … ow_to_Post
Sorry! I corrected it!
---
I know you stated that you installed yesterday, which likely means you are using systemd, but I just want to make sure.... you are using systemd right?
yes that indeed i do!
---
Gnarl: I'm affraid it did not work, i did as you wrote
this command didn't return anything
systemctl daemon-reload
Offline
I used systemd:
systemctl enable httpd.service
which didn't produce any errors. nor output at all.
It should have given you this output:
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
Have you successfully enabled other services?
Also this command works, so I don't think it's the httpd service that have a problem.
systemctl enable httpd.service
That's the enable command again - did you mean 'systemctl start'?
Create a httpd.service file in /etc/systemd/system/
Unnecessary, the apache package already provides the required service file.
Offline
What does 'systemctl status httpd.service' have to say? Also, 'journald' may contain some clues.
Offline
Jobbe wrote:I used systemd:
systemctl enable httpd.service
which didn't produce any errors. nor output at all.
It should have given you this output:
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
I just tried this command (after i did a disable)
sudo systemctl enable httpd.service
which gave this output:
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
Have you successfully enabled other services?
yes, I got GDM working - with trouble! (systemd didn't work as expected either)
Jobbe wrote:Also this command works, so I don't think it's the httpd service that have a problem.
systemctl enable httpd.service
That's the enable command again - did you mean 'systemctl start'?
I did. Sorry!
---
Still httpd is not running ..
Offline
Jobbe wrote:I used systemd:
systemctl enable httpd.service
which didn't produce any errors. nor output at all.
It should have given you this output:
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
Have you successfully enabled other services?
Jobbe wrote:Also this command works, so I don't think it's the httpd service that have a problem.
systemctl enable httpd.service
That's the enable command again - did you mean 'systemctl start'?
Gnarl wrote:Create a httpd.service file in /etc/systemd/system/
Unnecessary, the apache package already provides the required service file.
The stock httpd.service did work for me.
The systemctl daemon-reload will not have an output
you'll have to start the service as you did above.
Offline
Hm. I reinstalled my system onto my SSD drive. And it works now. I don't know what else I did, since I did exactly the same as when I installed before.
Last edited by Jobbe (2012-10-19 23:06:12)
Offline
After the httpd service is enabled didn't work to start the service on boot, but I could fix the error when I comment out the Listen option with the IP address in the /etc/httpd/conf/httpd.conf file, then I added an new Listen with the apache port "80", like below:
#Listen 12.34.56.78:80
#Listen 127.0.0.1:80
Listen 80
Finally, when I rebooted my arch-server the apache service started without any error from boot.
Offline
It is quite unlikely that whatever issue you had was the same as the one that was solved in this thread 5 years ago.
Please don't necrobump: https://wiki.archlinux.org/index.php/Co … bumping.22
Closing.
Offline
Pages: 1
Topic closed