little_freak Posted January 11, 2013 Share Posted January 11, 2013 (edited) I've been using WAMPs since I started web development but recently I decided to get my hands a little dirty and to set Apache, PHP, MySQL and phpMyAdmin up by myself. I had been fiddling around in the Apache configuration for a while so I have a little experience. I installed Apache 2.2.22, PHP 5.3.5, MySQL 5.5 and phpMyAdmin 3.5.5 and after a little configuration I got everything to work together. I quickly ran into problems with Apache and my lack of understanding of it. Many of the things that used to work perfectly in the WAMP httpd.conf have either no effect on my fresh install or prevent me from starting the server. Some examples: The ErrorLogFormat directive prevents Apache from starting which is weird because it's part of the core module. Even though I have both mod_info.so and mod_status.so, if I try to start with SetHandler server-info or SetHandler server-status (within Location directives of course) the Apache will not start. For some reason the installation does not come with mod_authz_core.so which I rely on quite a bit (not sure if that's because it's obsolete and has been replaced or what). I don't know enough about compiling Apache or whatever you need to do to add additional modules. Some of the directives I use seem to be completely ignored even though I know the modules are loaded. For example, I made my own index page with handpicked icons. The mod_autoindex.so takes care of these things and I'm using a bunch of AddDescription, AddIcon, AddIconByType and other directives like that. Everything seems to work except that it's unable to find my icons, which are in the server root in a folder called "icons" just like on my WAMP setup so nothing has changed - except that things aren't working. The great thing about the Apache web server is that if it isn't able to start because of misconfiguration it only shows a window saying "The requested operation has failed!". The programmers could just as well have written something like "Hahaha! You idiot! You're screwed now!". Edited January 11, 2013 by little_freak Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/ Share on other sites More sharing options...
Christian F. Posted January 11, 2013 Share Posted January 11, 2013 What does the error log say? Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/#findComment-1405046 Share on other sites More sharing options...
little_freak Posted January 11, 2013 Author Share Posted January 11, 2013 Nothing much useful. Here's an example (pretty much just a bunch of startups and shutdowns): [Fri Jan 11 19:51:29 2013] [notice] Parent: Received shutdown signal -- Shutting down the server. [Fri Jan 11 19:51:29 2013] [notice] Child 6136: Exit event signaled. Child process is ending. [Fri Jan 11 19:51:29 2013] [info] Child 6136: Accept thread exiting. [Fri Jan 11 19:51:30 2013] [notice] Child 6136: Released the start mutex [Fri Jan 11 19:51:30 2013] [info] Child 6136: 64 threads blocked on the completion port [Fri Jan 11 19:51:31 2013] [notice] Child 6136: All worker threads have exited. [Fri Jan 11 19:51:31 2013] [notice] Child 6136: Child process is exiting [Fri Jan 11 19:51:31 2013] [notice] Parent: Child process exited successfully. [Fri Jan 11 19:51:31 2013] [info] removed PID file C:/Apache2.2.22/logs/httpd.pid (pid=4304) [Fri Jan 11 19:51:37 2013] [notice] Apache/2.2.22 (Win32) PHP/5.3.5 configured -- resuming normal operations [Fri Jan 11 19:51:37 2013] [notice] Server built: Jan 28 2012 11:16:39 [Fri Jan 11 19:51:37 2013] [notice] Parent: Created child process 3936 [Fri Jan 11 19:51:38 2013] [notice] Child 3936: Child process is running [Fri Jan 11 19:51:38 2013] [info] Parent: Duplicating socket 312 and sending it to child process 3936 [Fri Jan 11 19:51:38 2013] [notice] Child 3936: Acquired the start mutex. [Fri Jan 11 19:51:38 2013] [notice] Child 3936: Starting 64 worker threads. [Fri Jan 11 19:51:38 2013] [notice] Child 3936: Starting thread to listen on port 80. [Fri Jan 11 19:52:12 2013] [notice] Parent: Received shutdown signal -- Shutting down the server. [Fri Jan 11 19:52:12 2013] [notice] Child 3936: Exit event signaled. Child process is ending. [Fri Jan 11 19:52:12 2013] [info] Child 3936: Accept thread exiting. [Fri Jan 11 19:52:13 2013] [notice] Child 3936: Released the start mutex [Fri Jan 11 19:52:13 2013] [info] Child 3936: 64 threads blocked on the completion port [Fri Jan 11 19:52:14 2013] [notice] Child 3936: All worker threads have exited. [Fri Jan 11 19:52:14 2013] [notice] Child 3936: Child process is exiting [Fri Jan 11 19:52:14 2013] [notice] Parent: Child process exited successfully. [Fri Jan 11 19:52:14 2013] [info] removed PID file C:/Apache2.2.22/logs/httpd.pid (pid=3108) [Fri Jan 11 19:52:18 2013] [notice] Apache/2.2.22 (Win32) PHP/5.3.5 configured -- resuming normal operations [Fri Jan 11 19:52:18 2013] [notice] Server built: Jan 28 2012 11:16:39 [Fri Jan 11 19:52:18 2013] [notice] Parent: Created child process 5340 [Fri Jan 11 19:52:19 2013] [notice] Child 5340: Child process is running [Fri Jan 11 19:52:19 2013] [info] Parent: Duplicating socket 312 and sending it to child process 5340 [Fri Jan 11 19:52:19 2013] [notice] Child 5340: Acquired the start mutex. [Fri Jan 11 19:52:19 2013] [notice] Child 5340: Starting 64 worker threads. [Fri Jan 11 19:52:19 2013] [notice] Child 5340: Starting thread to listen on port 80. [Fri Jan 11 19:55:10 2013] [notice] Parent: Received shutdown signal -- Shutting down the server. [Fri Jan 11 19:55:10 2013] [notice] Child 5340: Exit event signaled. Child process is ending. [Fri Jan 11 19:55:10 2013] [info] Child 5340: Accept thread exiting. [Fri Jan 11 19:55:11 2013] [notice] Child 5340: Released the start mutex [Fri Jan 11 19:55:11 2013] [info] Child 5340: 64 threads blocked on the completion port [Fri Jan 11 19:55:12 2013] [notice] Child 5340: All worker threads have exited. [Fri Jan 11 19:55:12 2013] [notice] Child 5340: Child process is exiting [Fri Jan 11 19:55:12 2013] [notice] Parent: Child process exited successfully. [Fri Jan 11 19:55:12 2013] [info] removed PID file C:/Apache2.2.22/logs/httpd.pid (pid=696) [Fri Jan 11 19:55:16 2013] [notice] Apache/2.2.22 (Win32) PHP/5.3.5 configured -- resuming normal operations [Fri Jan 11 19:55:16 2013] [notice] Server built: Jan 28 2012 11:16:39 [Fri Jan 11 19:55:16 2013] [notice] Parent: Created child process 6136 [Fri Jan 11 19:55:17 2013] [notice] Child 6136: Child process is running [Fri Jan 11 19:55:17 2013] [info] Parent: Duplicating socket 312 and sending it to child process 6136 [Fri Jan 11 19:55:17 2013] [notice] Child 6136: Acquired the start mutex. [Fri Jan 11 19:55:17 2013] [notice] Child 6136: Starting 64 worker threads. [Fri Jan 11 19:55:17 2013] [notice] Child 6136: Starting thread to listen on port 80. [Fri Jan 11 19:56:38 2013] [notice] Parent: Received shutdown signal -- Shutting down the server. [Fri Jan 11 19:56:38 2013] [notice] Child 6136: Exit event signaled. Child process is ending. [Fri Jan 11 19:56:39 2013] [info] Child 6136: Accept thread exiting. [Fri Jan 11 19:56:39 2013] [notice] Child 6136: Released the start mutex [Fri Jan 11 19:56:39 2013] [info] Child 6136: 64 threads blocked on the completion port [Fri Jan 11 19:56:40 2013] [notice] Child 6136: All worker threads have exited. [Fri Jan 11 19:56:40 2013] [notice] Child 6136: Child process is exiting [Fri Jan 11 19:56:40 2013] [notice] Parent: Child process exited successfully. [Fri Jan 11 19:56:40 2013] [info] removed PID file C:/Apache2.2.22/logs/httpd.pid (pid=5460) [Fri Jan 11 19:56:44 2013] [notice] Apache/2.2.22 (Win32) PHP/5.3.5 configured -- resuming normal operations [Fri Jan 11 19:56:44 2013] [notice] Server built: Jan 28 2012 11:16:39 [Fri Jan 11 19:56:44 2013] [notice] Parent: Created child process 5664 [Fri Jan 11 19:56:45 2013] [notice] Child 5664: Child process is running [Fri Jan 11 19:56:45 2013] [info] Parent: Duplicating socket 312 and sending it to child process 5664 [Fri Jan 11 19:56:45 2013] [notice] Child 5664: Acquired the start mutex. [Fri Jan 11 19:56:45 2013] [notice] Child 5664: Starting 64 worker threads. [Fri Jan 11 19:56:45 2013] [notice] Child 5664: Starting thread to listen on port 80. [Fri Jan 11 19:59:06 2013] [notice] Parent: Received shutdown signal -- Shutting down the server. [Fri Jan 11 19:59:06 2013] [notice] Child 5664: Exit event signaled. Child process is ending. [Fri Jan 11 19:59:07 2013] [info] Child 5664: Accept thread exiting. [Fri Jan 11 19:59:07 2013] [notice] Child 5664: Released the start mutex [Fri Jan 11 19:59:07 2013] [info] Child 5664: 64 threads blocked on the completion port [Fri Jan 11 19:59:08 2013] [notice] Child 5664: All worker threads have exited. [Fri Jan 11 19:59:08 2013] [notice] Child 5664: Child process is exiting [Fri Jan 11 19:59:08 2013] [notice] Parent: Child process exited successfully. [Fri Jan 11 19:59:08 2013] [info] removed PID file C:/Apache2.2.22/logs/httpd.pid (pid=1992) [Fri Jan 11 19:59:12 2013] [notice] Apache/2.2.22 (Win32) PHP/5.3.5 configured -- resuming normal operations [Fri Jan 11 19:59:12 2013] [notice] Server built: Jan 28 2012 11:16:39 [Fri Jan 11 19:59:12 2013] [notice] Parent: Created child process 1928 [Fri Jan 11 19:59:12 2013] [notice] Child 1928: Child process is running [Fri Jan 11 19:59:12 2013] [info] Parent: Duplicating socket 312 and sending it to child process 1928 [Fri Jan 11 19:59:12 2013] [notice] Child 1928: Acquired the start mutex. [Fri Jan 11 19:59:12 2013] [notice] Child 1928: Starting 64 worker threads. [Fri Jan 11 19:59:12 2013] [notice] Child 1928: Starting thread to listen on port 80. [Fri Jan 11 20:03:32 2013] [notice] Parent: Received shutdown signal -- Shutting down the server. [Fri Jan 11 20:03:32 2013] [notice] Child 1928: Exit event signaled. Child process is ending. [Fri Jan 11 20:03:33 2013] [info] Child 1928: Accept thread exiting. [Fri Jan 11 20:03:33 2013] [notice] Child 1928: Released the start mutex [Fri Jan 11 20:03:33 2013] [info] Child 1928: 64 threads blocked on the completion port [Fri Jan 11 20:03:34 2013] [notice] Child 1928: All worker threads have exited. [Fri Jan 11 20:03:34 2013] [notice] Child 1928: Child process is exiting [Fri Jan 11 20:03:34 2013] [notice] Parent: Child process exited successfully. [Fri Jan 11 20:03:34 2013] [info] removed PID file C:/Apache2.2.22/logs/httpd.pid (pid=3176) Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/#findComment-1405052 Share on other sites More sharing options...
little_freak Posted January 11, 2013 Author Share Posted January 11, 2013 (edited) Now, there's nothing in my log about my icons problem because I fixed that already but the solution I used was more of a workaround. I don't think Apache writes to the logs if it's not able to start up so there's not going to be any answer there - unless I'm wrong. The server wasn't giving me access to the icons folder through localhost so I put the following: Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all I believe these directives are from the mod_authz_host module but on my WAMP I had used: Require all granted Which I believe comes from the mod_authz_core but that doesn't seem to have any effect - my server didn't come with that module. I don't really know what the difference is between those two methods but I prefer the latter because it's simplier and a single line. Edited January 11, 2013 by little_freak Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/#findComment-1405053 Share on other sites More sharing options...
little_freak Posted January 11, 2013 Author Share Posted January 11, 2013 (edited) Now I just realised that the directory listing is quite different than what it was like in my WAMP. I'm using the same CSS file and settings for the WAMP and the newly installed Apache: IndexOptions FancyIndexing FoldersFirst HTMLTable VersionSort XHTML IndexStyleSheet "C:/Apache2.2.22/conf/style.css" But the output is different because the Apache, unlike WAMP, doesn't output ids and classes so most of my CSS for the table gets ignored. Fantastic! I know that this isn't a big problem: Making your directory listing fansy and stylistic isn't important but it's just unacceptable that your settings aren't working. Edited January 11, 2013 by little_freak Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/#findComment-1405054 Share on other sites More sharing options...
Christian F. Posted January 11, 2013 Share Posted January 11, 2013 WAMP is using Apache. And it has nothing to do with outputting IDs or class names, that's all confined to your HTML code (or whatever produces said code). Apache, and thus by extension the WAMP (which stands for Windows, Apache, MySQL & PHP/Perl/Python) package, serves the content as is. Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/#findComment-1405055 Share on other sites More sharing options...
little_freak Posted January 12, 2013 Author Share Posted January 12, 2013 (edited) I think you're misunderstanding me completely. Obviously I know that Apache is part of the WAMP and I know what it stands for. I'm not talking about (X)HTML code in general. You know how Apache has a "directory listing" feature? If you go to a directory which doesn't have index.php, index.html or whatever you set the index to then Apache will generate some HTML code that contains links to the subdirectories and the files in said directory. I didn't show this for no reason: IndexOptions FancyIndexing FoldersFirst HTMLTable VersionSort XHTML IndexStyleSheet "C:/Apache2.2.22/conf/style.css" Apache then serves you a page with substandard HTML but you have a way to style it using the IndexStyleSheet directive. However, on the fresh install, when Apache generates the HTML for the directory listing it doesn't include "ids" and "classes" but on the WAMP (which was set up by the guys who produce The Uniform Server) it includes the "ids" and "classes". They're called indextitle, indexlist, indexhead etc. These were chosen by the Apache developers for you to set in your style sheet that IndexStyleSheet uses. This is probably just a config issue although I can't see how because my old config file doesn't have anything that the new one doesn't have. Anyway, this is just one of the multiple problems with my fresh install. Edited January 12, 2013 by little_freak Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/#findComment-1405064 Share on other sites More sharing options...
Christian F. Posted January 12, 2013 Share Posted January 12, 2013 You're right, I did indeed misunderstand you. Sorry about that. I've done some research into this, and it may seem like the WAMP package you were using had some custom styles defined. Which is why you're not seeing them on vanilla Apache. Here's a couple of links that should be of help: http://perishablepress.com/better-default-directory-views-with-htaccess/ http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html (#indexoptions in particular) Quote Link to comment https://forums.phpfreaks.com/topic/273042-new-to-apache-need-help/#findComment-1405123 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.