View Full Version : Quick Question(s) Apache 2
linutzy
28th July 2005, 14:23
How do you get rid of the default page http://www.example.com/apache2-default/. I just need to get rid of apache2-default and not break my debian apache box.
Also followed these steps:
apt-get install webalizer
<- /var/www/webalizer
<- Usage Statistics for
<- /var/log/apache/access.log.1
However when I access http://www.example.com/webalizer I get the standard browser output:
Index of /webalizer
Name Last modified Size Description
....and no files are listed. Just wondering if someone can tell me what I might have to look at to get it running properly....By the way great tutorials Falko.
falko
29th July 2005, 12:40
How do you get rid of the default page http://www.example.com/apache2-default/. I just need to get rid of apache2-default and not break my debian apache box.
You must edit /etc/apache2/sites-available/default and comment out the following line:
RedirectMatch ^/$ /apache2-default/
Then restart Apache:
/etc/init.d/apache2 restart
However when I access http://www.example.com/webalizer I get the standard browser output:
You must run webalizer manually or with a cron job so that it creates statistics in the webalizer directory. Something like
webalizer -n www.example.com -s www.example.com -r www.example.com -q -T -o /var/www/webalizer -c /path/to/webalizer.conf /var/log/apache2/access.log might work. See man webalizer for more details.
linutzy
2nd August 2005, 21:31
I've been at the falkotimme site so many times when doing an install of debian it's sick.
If I choose to comment the redirect how will it effect any users I create on the debian box. I just want to create a mock web server for learning purposes.
falko
2nd August 2005, 22:44
I've been at the falkotimme site so many times when doing an install of debian it's sick.
If I choose to comment the redirect how will it effect any users I create on the debian box. I just want to create a mock web server for learning purposes.
It won't have any effect on your users. It just tells the Apache not to go to the apache2-default directory by default.
linutzy
3rd August 2005, 12:38
On the falkotimme.com debian 3.1 setup link (followed it word for word) you have this.
Edit /etc/mime.types and comment out the following lines:
#application/x-httpd-php phtml pht php
#application/x-httpd-php-source phps
#application/x-httpd-php3 php3
#application/x-httpd-php3-preprocessed php3p
#application/x-httpd-php4 php4
Edit /etc/apache2/mods-enabled/php4.conf and comment out the following lines:
<IfModule mod_php4.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>
Did you want us to add the "#" because originally they were not there?
Regardless in /var/www I created a 'phpinfo.php' file.
When I load the page all I have is this show up and not the php blue and grey variable listing page.
<?php
phpinfo();
?>
Did I miss a step and why did you add the comments?
falko
3rd August 2005, 13:19
On the falkotimme.com debian 3.1 setup link (followed it word for word) you have this.
Edit /etc/mime.types and comment out the following lines:
#application/x-httpd-php phtml pht php
#application/x-httpd-php-source phps
#application/x-httpd-php3 php3
#application/x-httpd-php3-preprocessed php3p
#application/x-httpd-php4 php4
Edit /etc/apache2/mods-enabled/php4.conf and comment out the following lines:
<IfModule mod_php4.c>
# AddType application/x-httpd-php .php .phtml .php3
# AddType application/x-httpd-php-source .phps
</IfModule>
Did you want us to add the "#" because originally they were not there?
Regardless in /var/www I created a 'phpinfo.php' file.
When I load the page all I have is this show up and not the php blue and grey variable listing page.
<?php
phpinfo();
?>
Did I miss a step and why did you add the comments?
Yes, I want you to add the #. This will disable PHP, because this guide is a preparation for the installation of ISPConfig, and in ISPConfig you can enable PHP on a per site basis. If I didn't add the #, then PHP would always be on, no matter you you enable or disable in ISPConfig. If you don't install ISPConfig, then don't add the #.
linutzy
3rd August 2005, 15:11
Are there any other changes in the debian 3.1 tutorial that you wrote specific to ISPconfig. An example would be the postfix/mysql setup also included?
Does ISPconfig cost money? I went to the site and all I see is a download link at sourceforge.
till
3rd August 2005, 15:17
Are there any other changes in the debian 3.1 tutorial that you wrote specific to ISPconfig. An example would be the postfix/mysql setup also included?
Does ISPconfig cost money? I went to the site and all I see is a download link at sourceforge.
ISPConfig is open source and there is not only a download link at the iSPConfig site:
http://www.ispconfig.org/
linutzy
9th August 2005, 19:07
ISPConfig is open source and there is not only a download link at the iSPConfig site:
http://www.ispconfig.org/
Cool I am looking through the docs now for ISPConfig. I'm just wondering if the setup done on falkotimme.com for (debian) Mysql and Postfix is a generic setup or if the setup much like the apache setup is related to ISPconfig.
falko
9th August 2005, 19:17
Cool I am looking through the docs now for ISPConfig. I'm just wondering if the setup done on falkotimme.com for (debian) Mysql and Postfix is a generic setup or if the setup much like the apache setup is related to ISPconfig.
Which setup (URL?) do you mean?
linutzy
9th August 2005, 19:47
Which setup (URL?) do you mean?
That would be the Perfect debian Setup. I notice that the Apache setup was created specifically for ISPconfig as indicated by this thread. I'm wondering if the falkotimme.com debian postfix setup was generic also or ISPconfig specific.
falko
9th August 2005, 20:06
The howtos written by me on HowtoForge are exactly the same as on falkotimme.com. The Perfect Setup for Debian Woody and that for Debian Sarge are indeed preparing the system for the use of ISPConfig. :)
maisy
29th October 2005, 05:36
To get rid of the default page
http://www.example.com/apache2-default/
edit /etc/apache2/sites-available/default
and find on line 17
RedirectMatch ^/$ /apache2-default/
and comment out so it looks like this
# RedirectMatch ^/$ /apache2-default/
then restart apache /etc/init.d/apache2 restart
P.S don't forget to include a index.html file in your web root, mine is /var/www/index.html
hope this helps :)
nok
23rd February 2006, 22:39
this works.... but all my sites goto this root (/var/www/index.html)
www.domain1.com should goto /home/www/web10/web (and so on)!!
Absolusteph
5th March 2006, 23:29
I
I install ISP after a perfect debian setup, all is ok but all my domain are redirected to the default apache 2 web page;
if i uncomment the redirect in the defautl configuration , apache show the listing of the files... not so good....
when i create the www.site1.com that redirect in /var/www/default.. instead of /home/web/site1.com/web as it wrote in the isp virtual host file .
If anybody can help me ....
thank a lot
till
5th March 2006, 23:44
Please do not double post:
http://www.howtoforge.com/forums/showpost.php?p=17745
Absolusteph
5th March 2006, 23:59
Ok scuse me.
Absolusteph
6th March 2006, 00:01
this works.... but all my sites goto this root (/var/www/index.html)
www.domain1.com should goto /home/www/web10/web (and so on)!!
do u have find a solution?
swones
15th August 2006, 13:42
Yes, I want you to add the #. This will disable PHP, because this guide is a preparation for the installation of ISPConfig, and in ISPConfig you can enable PHP on a per site basis. If I didn't add the #, then PHP would always be on, no matter you you enable or disable in ISPConfig. If you don't install ISPConfig, then don't add the #.
Hi Falko, I'm glad I found my way to this post, perhaps you could put a mention of the above in the Perfect Sarge Setup guide? I quickly realised why the php was not being parsed but was puzzled why it was being disabled in your guide. I understand now but think it would help others to mention this.
Also I must say "thank you" for providing such an excellent resource. I've learnt so much from the guides here.
Kind Regards,
Simon
falko
16th August 2006, 17:20
Also I must say "thank you" for providing such an excellent resource. I've learnt so much from the guides here.
You're welcome. :)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.