View previous topic :: View next topic |
Author |
Message |
zeveck Apprentice
Joined: 17 Mar 2005 Posts: 173 Location: Boston, MA
|
Posted: Sun Jun 12, 2005 2:04 pm Post subject: Best apache2 HOWTO? |
|
|
What is the best apache2 HOWTO?
I am trying to run a server that supports apache2 with SSL, PHP, and maybe Perl. I also want to run MySQL and PHPMyAdmin.
I tried looking for HOWTOs, but, for instance, the http://gentoo-wiki.com/HOWTO_Apache2 howto says it is outdated and need to be rewritten...and searches result in likewise finding lots of information that appears similarly outdated.
So...what is the most modern set of HOWTOs, &c., I would need to get the above up and running? |
|
Back to top |
|
|
srlinuxx l33t
Joined: 22 Nov 2003 Posts: 627
|
Posted: Sun Jun 12, 2005 4:35 pm Post subject: |
|
|
Well, there probably isn't a gentoo specific one, and their ebuild changes quite a bit as I recall (file names and locations). But you really can't beat the source on this one: install with options and all the related docs are here. There are a few ebuilds I pass on and this is one of 'em. But perhaps you can use them in conjunction with the gentoo howto and get it going. _________________ --You talk the talk, but do you waddle the waddle?
-Gentoo Monthly Screenshots |
|
Back to top |
|
|
Lousie_Louie n00b
Joined: 06 Jun 2005 Posts: 13
|
Posted: Sun Jun 12, 2005 9:20 pm Post subject: |
|
|
I am also trying to get php to work on Gentoo. I have been following the instructions on the same page from the Gentoo Wiki, and Apache works, but I can't get php to respond. I have emerged php and mod_php and added
APACHE2_OPTS="-D SSL -D PHP4"
to
/etc/conf.d/apache2
But php pages still come back as plain code. I'm guessing somthing has changed, can anyone help fix this wiki page? |
|
Back to top |
|
|
Lousie_Louie n00b
Joined: 06 Jun 2005 Posts: 13
|
|
Back to top |
|
|
asuweb n00b
Joined: 05 Jun 2005 Posts: 4
|
Posted: Mon Jun 13, 2005 5:32 pm Post subject: |
|
|
Quote: | I am also trying to get php to work on Gentoo. I have been following the instructions on the same page from the Gentoo Wiki, and Apache works, but I can't get php to respond. I have emerged php and mod_php and added
APACHE2_OPTS="-D SSL -D PHP4"
to
/etc/conf.d/apache2
But php pages still come back as plain code. I'm guessing somthing has changed, can anyone help fix this wiki page? |
Add the following line to /etc/apache2/conf/apache2.conf
Code: | LoadModule php4_module /usr/lib/apache2-extramodules/libphp4.so |
assuming that the path to libphp4.so is as above.
Then restart apache Code: | /etc/init.d/apache2 restart | and that should work. |
|
Back to top |
|
|
nobspangle Veteran
Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Mon Jun 13, 2005 6:48 pm Post subject: |
|
|
you don't need to add any lines to your config files, the -D PHP4 is all you need (providing you've emerged PHP 4 not 5)
go to a page that doesn't exisit and you will get the apache 404 page, at the bottom will be the server banner something like
Quote: | Apache/2.0.54 (Gentoo/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e PHP/4.3.11 |
If it doesn't say PHP then you haven't loaded the module, do a
Code: | ps aux | grep apache | and check that the command running apache includes the -D PHP4 |
|
Back to top |
|
|
Lousie_Louie n00b
Joined: 06 Jun 2005 Posts: 13
|
Posted: Mon Jun 13, 2005 8:13 pm Post subject: |
|
|
Thanks asuweb! Your advice worked! |
|
Back to top |
|
|
asuweb n00b
Joined: 05 Jun 2005 Posts: 4
|
Posted: Mon Jun 13, 2005 8:15 pm Post subject: |
|
|
Glad I could be of help. I had the same problem, took me a while to figure it out. |
|
Back to top |
|
|
ronnie n00b
Joined: 21 Jul 2004 Posts: 66
|
Posted: Tue Jun 14, 2005 12:52 pm Post subject: |
|
|
There are numerous places where you can put the "LoadModule" command.
But as nobspangle said, there should be no need to edit/hack apache2.conf. It should actually be loaded in /etc/apache2/conf/modules.d/70_mod_php.conf along with the rest of the PHP configuration when "-D PHP4" is passed to the start script, else something likely is wrong. |
|
Back to top |
|
|
Lousie_Louie n00b
Joined: 06 Jun 2005 Posts: 13
|
Posted: Tue Jun 14, 2005 7:37 pm Post subject: |
|
|
Ok this was working with php, but now it quit.
Here are my apache commands:
Code: | axiom@axiom axiom $ ps aux | grep apache
root 12011 0.0 1.3 28196 11920 ? Ss 09:06 0:00 apache2 -k restart
apache 12270 0.0 1.3 28196 11932 ? S 09:11 0:00 apache2 -k restart
apache 12271 0.0 1.3 28196 12064 ? S 09:11 0:00 apache2 -k restart
apache 12272 0.0 1.3 28464 12284 ? S 09:11 0:00 apache2 -k restart
apache 12273 0.0 1.3 28196 12008 ? S 09:11 0:00 apache2 -k restart
apache 12274 0.0 1.3 28464 12280 ? S 09:11 0:00 apache2 -k restart
apache 12275 0.0 1.3 28196 12056 ? S 09:11 0:00 apache2 -k restart
apache 12282 0.0 1.3 28196 12052 ? S 09:12 0:00 apache2 -k restart
apache 12286 0.0 1.3 28196 12068 ? S 09:12 0:00 apache2 -k restart
root 17873 0.0 0.0 1768 860 pts/3 S+ 15:27 0:00 nano /etc//apache2/conf/modules.d/70_mod_php.conf
axiom 18342 0.0 0.0 1496 452 pts/5 R+ 15:33 0:00 grep apache
axiom@axiom axiom $ |
Here is my 404: Code: | Apache/2.0.54 (Gentoo/Linux) PHP/4.3.11 Server at 127.0.0.1 |
Here is another file you mentioned /etc/apache2/conf/modules.d/70_mod_php.conf
Code: | # vim: ft=apache sw=4 ts=4
<IfDefine PHP4>
# Load the module first
<IfModule !sapi_apache2.c>
LoadModule php4_module extramodules/libphp4.so
</IfModule>
# Set it to handle the files
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
</IfModule>
# Fix some bugs
<Files *.php>
# keep this the same size as post_max_size in php.ini
# LimitRequestBody 8388608
</Files>
<Files *.php3>
# keep this the same size as post_max_size in php.ini
# LimitRequestBody 8388608
</Files>
<Files *.php4>
# keep this the same size as post_max_size in php.ini
# LimitRequestBody 8388608
</Files>
<Files *.phps>
# keep this the same size as post_max_size in php.ini
# LimitRequestBody 8388608
</Files>
<Files *.phtml>
# keep this the same size as post_max_size in php.ini
# LimitRequestBody 8388608
</Files>
</IfDefine>
|
This has got to be somthing simple. |
|
Back to top |
|
|
|