![]() |
|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
After trying to chroot native httpd, I decided to move back to Apache 2.
But I can't start it. Is it blocked on OpenBSD 5.6? Is there any trick to start Apache2 on OpenBSD 5.6? Also, in rc.conf there's only a httpd_flags associated to hhtpd so I presume we cannot start Apache2 at boot? Thanks... |
|
||||
![]()
Hello, and welcome.
Apache 2 is not a built-in application. Instead, it is available as a 3rd party package, installable via pkg_add(1). The name of the package is apache-httpd. This was used to differentiate it, historically, from OpenBSD's fork of Apache 1.3 that used to be a built-in application. OpenBSD's Apache 1.3 is still available, as a package: apache-httpd-openbsd. If you're unfamiliar with pkg_add(1) and OpenBSD's other third party package management tools, please refer to FAQ 15. Last edited by jggimi; 18th April 2015 at 11:54 PM. Reason: clarity |
|
|||
![]()
I know perfectly how to add a package...
![]() I get absolutely no error message, the syntax of the conf file is ok. No httpd2 process runs after those commands. |
|
||||
![]()
That was not clear from your initial post.
The pkg_info(1) tool has a handy -L option. The output will show what is installed, or, as shown in my example below, the output is from an inspection of an uninstalled package located at $PKG_PATH. The executable programs installed with Apache 2 are highlighted, and the start/stop script for use in rc.conf.local(5) is highlighted in red. Code:
$ pkg_info -L apache-httpd Information for http://mirrors.gigenet.com/pub/OpenBSD/snapshots/packages/i386/apache-httpd-2.2.29p3.tgz Files: /usr/local/include/apache2/ap_compat.h /usr/local/include/apache2/ap_config.h /usr/local/include/apache2/ap_config_auto.h . . . [snip] . . . /usr/local/sbin/ab /usr/local/sbin/apachectl2 /usr/local/sbin/apxs2 /usr/local/sbin/checkgid /usr/local/sbin/dbmmanage2 /usr/local/sbin/envvars /usr/local/sbin/envvars-std /usr/local/sbin/htcacheclean /usr/local/sbin/htdbm /usr/local/sbin/htdigest2 /usr/local/sbin/htpasswd2 /usr/local/sbin/httpd2 /usr/local/sbin/httxt2dbm /usr/local/sbin/logresolve2 /usr/local/sbin/rotatelogs2 /usr/local/sbin/suexec2 . . . [snip] . . . /usr/local/share/examples/apache2/icons/world2.gif /usr/local/share/examples/apache2/icons/world2.png /etc/rc.d/apache2 Last edited by jggimi; 19th April 2015 at 03:15 AM. Reason: rc.conf.local man page link manually corrected |
|
|||
![]()
I did the pkg_info output before to be sure all was properly installed. All is ok.
The problem is I can't start Apache2 in any way. There's two methods I know for starting Apache2 sudo apachectl2 start and sudo httpd2 -k start when I type those commands, absolutely no errors are displayed but the process doesn't start. Also the /etc/rc.d/apache2 in /etc/rc.conf/local doesn't start Apache2 neither on startup. I guess there is a tweak to start Apache2 on Openbsd. |
|
|||
![]()
Here's my output:
doing _rc_read_runfile doing rc_check apache2 doing rc_pre doing rc_start doing _rc_rm_runfile (failed) In your example I guess the server doesn't start because it can't find a fully qualified domain name. But in my case absolutely no error message appears! How can find what's going wrong? |
|
||||
![]()
I found these options in the httpd2(8) man page.
Code:
-e Sets the LogLevel to level during server startup. This is useful for temporarily increasing the verbosity of the error messages to find problems during startup. -X Run httpd2 in debug mode. Only one worker will be started and the server will not detach from the console. |
|
|||
![]()
Ok, problem solved.
It was a line missing in the /etc/hosts file. Lacks the IPV4 adress associated with my machine domain name. Now it works perfectly! Thank you for your kind help and for the time you spent answering!! ![]() |
![]() |
Tags |
apache2 httpd2 |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting OpenBSD up and running | Larry | OpenBSD Installation and Upgrading | 10 | 14th May 2010 11:14 PM |
Upgrade Apache 1.3 mod_ssl to Apache 2.2 | beandip | FreeBSD Ports and Packages | 11 | 26th March 2009 09:12 PM |
Running your own web server | JMJ_coder | General software and network | 28 | 13th February 2009 01:15 AM |
can't start apache "httpd not running" | disappearedng | FreeBSD General | 5 | 22nd September 2008 10:18 PM |
Problems running jdk-1.7 | incripshin | OpenBSD Packages and Ports | 10 | 10th August 2008 05:54 PM |