Apache2 config on OpenBSD 5.5
Hey there, its kinda confusing to see config files all over the place. I can find files in /etc/apache2 as well as in /var/www/conf. So first thing first. As I notices apache 1.3 insnt used in OpenBSD 5.5 right? So I can asume there should be no apache 1.3 running at all. Second I installed the apache2 package and got the config files at /etc/apache2 but when I did some changes I noticed they are not applied after restarting apache so I took a look around and found config files under /var/www/conf too which where used by the apachectl script. Beisde this I check my phpinfo() _I and got the info that Im running a apache 1.3 So what is the deal now, do I have a 1.3 installed by the default when I set up the system or is it just some weird mix up that happens because I installed the apache2 package? Another question would be the chroot, is the apache2 chrooted by the default still ? Oh and if someone has some helpful links on all this that would be extremly helpful. Regards Markus -- Markus Rosjatfon: +49 351 8107223mail: ros...@ghweb.de G+H Webservice GbR Gorzolla, Herrmann Königsbrücker Str. 70, 01099 Dresden http://www.ghweb.de fon: +49 351 8107220 fax: +49 351 8107227 Bitte prüfen Sie, ob diese Mail wirklich ausgedruckt werden muss! Before you print it, think about your responsibility and commitment to the ENVIRONMENT
Re: Apache2 config on OpenBSD 5.5
On 06/02/14 10:41, Markus Rosjat wrote: Hey there, its kinda confusing to see config files all over the place. I can find files in /etc/apache2 as well as in /var/www/conf. So first thing first. As I notices apache 1.3 insnt used in OpenBSD 5.5 right? So I can asume there should be no apache 1.3 running at all. Second I installed the apache2 package and got the config files at /etc/apache2 but when I did some changes I noticed they are not applied after restarting apache so I took a look around and found config files under /var/www/conf too which where used by the apachectl script. Beisde this I check my phpinfo() _I and got the info that Im running a apache 1.3 So what is the deal now, do I have a 1.3 installed by the default when I set up the system or is it just some weird mix up that happens because I installed the apache2 package? Another question would be the chroot, is the apache2 chrooted by the default still ? Oh and if someone has some helpful links on all this that would be extremly helpful. Regards Markus Apache 1.3 is still installed. In -current and upcoming 5.6 it will be substituted by nginx. I never used apache2 on OpenBSD, but i can imagine that it lives in /usr/local and you should make sure to call apachectl with an absolute path. The files in /var/www/conf are for the apache 1.3 in base.
Re: Apache2 config on OpenBSD 5.5
On Mon, Jun 02, 2014 at 10:41:33AM +0200, Markus Rosjat wrote: Hey there, its kinda confusing to see config files all over the place. I can find files in /etc/apache2 as well as in /var/www/conf. So first thing first. As I notices apache 1.3 insnt used in OpenBSD 5.5 right? No. http://www.openbsd.org/55.html lists apache 1.3 as a base component. The change you're asking about happened after 5.5, i.e. will happen in 5.6. So I can asume there should be no apache 1.3 running at all. Second I installed the apache2 package and got the config files at /etc/apache2 but when I did some changes I noticed they are not applied after restarting apache so I took a look around and found config files under /var/www/conf too which where used by the apachectl script. Beisde this I check my phpinfo() _I and got the info that Im running a apache 1.3 What do you want? Do you want apache2 shipped from httpd.apache.org, or do you want OpenBSD's fork of apache1? If you want the fork, you don't need to install a package on 5.5. On 5.6, you will need to install the apache-httpd-openbsd package. So what is the deal now, do I have a 1.3 installed by the default when I set up the system or is it just some weird mix up that happens because I installed the apache2 package? The apache2 package installs apache2 as shipped from httpd.apache.org in a way that avoids conflicts with the base httpd1. Listing the contents of the apache-httpd package might give some clues. Below, I'm omitting (marked with [...]) files which aren't interesting: $ pkg_info -L apache-httpd Information for inst:apache-httpd-2.2.27p1 Files: [...] /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 [...] /etc/rc.d/httpd2 Many files have a '2' suffix to prevent conflicts with base httpd1 and the apache-httpd-openbsd package. You can use the httpd2 init script to start/stop/restart the service. All config files are in /etc/apache2. Instead of /var/www, the example configuration files use /var/apache2. This can of course be changed but I'd recommend using /var/apache2 if you want to use apache2. This way, your data stays out of the way of the httpd1 removal when you upgrade to 5.6. Note that there's also a separate _apache2 user. Don't use www for apache2. www is used by httpd1 and (in 5.6) nginx. Another question would be the chroot, is the apache2 chrooted by the default still ? Not by default. But it's possible to configure a chroot. This is explained in the apache2 documentation, which see for details. The following httpd.conf directives run apache2 in a chroot in /var/apache2: ServerRoot /var/apache2 ChrootDir /var/apache2 User _apache2 Group _apache2 Oh and if someone has some helpful links on all this that would be extremly helpful. For base httpd: http://www.openbsd.org/faq/faq10.html#httpdchroot http://undeadly.org/cgi?action=articlesid=20140314080734 For apache2, see the upstream docs: http://httpd.apache.org/docs/2.2/
Re: Apache2 config on OpenBSD 5.5
Em 02-06-2014 05:41, Markus Rosjat escreveu: Hey there, its kinda confusing to see config files all over the place. I can find files in /etc/apache2 as well as in /var/www/conf. So first thing first. As I notices apache 1.3 insnt used in OpenBSD 5.5 right? So I can asume there should be no apache 1.3 running at all. Second I installed the apache2 package and got the config files at /etc/apache2 but when I did some changes I noticed they are not applied after restarting apache so I took a look around and found config files under /var/www/conf too which where used by the apachectl script. Beisde this I check my phpinfo() _I and got the info that Im running a apache 1.3 So what is the deal now, do I have a 1.3 installed by the default when I set up the system or is it just some weird mix up that happens because I installed the apache2 package? Another question would be the chroot, is the apache2 chrooted by the default still ? Oh and if someone has some helpful links on all this that would be extremly helpful. Regards Markus Given the upcoming demise of base apache on 5.6, I've migrated to nginx a long time ago and never looked back. Perhaps, instead of installing apache2, you could give a try to base nginx? Cheers, -- Giancarlo Razzolini GPG: 4096R/77B981BC