Mahngiel Posted August 30, 2012 Share Posted August 30, 2012 On my debian-based machines running 2.2, the provided packages created four folders: sites-available/enabled & mods-available/enabled You created your vhosts and downloaded modules to the available and when enabled, a symlink was created in the 'enabled' directory. apache2.conf directed the webserver to these folders with: Include sites-enabled/ Include mods-enabled/*.conf Include mods-enabled/*.load I recently created a new partition and compiled 2.4, which introduced many changes. Having never compiled 2.2, I don't know if the debian packages modified the structure and base config, but it's quite different. Namely, there seems to be no staging. I'm trying to stage all my virtualhost files, but the server seems to dislike the method. In the new httpd.conf, I gave the pseudo-same directive to include a folder for the vhosts, but it's bricking. 465 Include enabled/ /home/apache2.4/bin/apachectl restart [Thu Aug 30 10:35:44.620828 2012] [core:error] [pid 7373:tid 140003760342784] AH00554: Access to file /home/apache2.4/enabled/ denied by server: not a regular file httpd: Syntax error on line 465 of /home/apache2.4/conf/httpd.conf: Could not open configuration file /home/apache2.4/enabled/: Bad file descriptor Looking through the changelog, I see nothing that describes changes to staging, and a serverfault thread suggests there should be an internal script to include a folder's contents. Am I missing something? Quote Link to comment https://forums.phpfreaks.com/topic/267812-24-and-includes/ Share on other sites More sharing options...
trq Posted August 30, 2012 Share Posted August 30, 2012 Having never compiled 2.2, I don't know if the debian packages modified the structure and base config, but it's quite different. The structure you describe in the initial part of your post is indeed added by the Debian packages. Compiling Apache yourself does not provide this same structure. Looking through the changelog, I see nothing that describes changes to staging I'm not sure what you mean exactly by *staging*. What exactly are you trying to do? In the new httpd.conf, I gave the pseudo-same directive to include a folder for the vhosts, but it's bricking. Does the directory /home/apache2.4/enabled exist ? Quote Link to comment https://forums.phpfreaks.com/topic/267812-24-and-includes/#findComment-1373877 Share on other sites More sharing options...
Mahngiel Posted August 30, 2012 Author Share Posted August 30, 2012 The structure you describe in the initial part of your post is indeed added by the Debian packages. Compiling Apache yourself does not provide this same structure. yea, makes sense. I'm not sure what you mean exactly by *staging*. What exactly are you trying to do? What I've always done with 2.2 was create one global config (httpd.conf) and then create virtualhosts for each site and overriding directives as needed. ex: denying .htaccess files globally, but requiring them to be read per vhost when required. Anyway, ultimately whether the vhosts are in the server root or in some distant folder, I'd like to contain all the files into one folder without needing to independently include them. Does the directory /home/apache2.4/enabled exist ? Yes, of course. /home is on it's own partition, and I compiled 2.4, php5.4, and pma3.5 there to isolate them as older versions are in the repo and I wanted to ensure no conflicts. Also, if everything worked out as planned, I could use them on my 'real' development partition. Furthermore, Include enabled/name works just fine Quote Link to comment https://forums.phpfreaks.com/topic/267812-24-and-includes/#findComment-1373890 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.