Apache2 Help.

  • GeekSince3
  • Graduate
  • Graduate
  • GeekSince3
  • Posts: 133
  • Loc: I live in Virginia

Post 3+ Months Ago

I CANNOT get my apache2 DocumentRoot file to work correctly, I want to change it so that it is running under a directory of my choice and not the default, any help would be greatly appreciated.
  • mochahost
  • Newbie
  • Newbie
  • mochahost
  • Posts: 8

Post 3+ Months Ago

what is your config file look like?
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Posts: 2700
  • Loc: Somewhere outside the box in Sarasota, FL.

Post 3+ Months Ago

I have some deja vu here.

Are you certain the config file you are using (editing) is the *same* config file in use by the binary executable?
  • GeekSince3
  • Graduate
  • Graduate
  • GeekSince3
  • Posts: 133
  • Loc: I live in Virginia

Post 3+ Months Ago

yea on my system Debian 3.1 Sarge I don't have the directory /etc/httpd/httpd.conf. I have a /etc/apache2/apache2.conf and that's where all of the files are at if it were /etc/httpd/httpd.conf
  • PsyckBoy
  • Graduate
  • Graduate
  • PsyckBoy
  • Posts: 204
  • Loc: SoCal

Post 3+ Months Ago

You should be editing:

/etc/apache2/sites-available/default

Site specific info should not be entered in apache2.conf.
  • GeekSince3
  • Graduate
  • Graduate
  • GeekSince3
  • Posts: 133
  • Loc: I live in Virginia

Post 3+ Months Ago

Allllrighty then....lol, well I have a much better question. How would I go about getting my default Apache2 settings back in place. Because the apache2.conf folder is pretty much fragged and I don't recall what the original settings were. I tried doing a Complete Removal if any of you have Debian and know what that means, i'm talking about the Synaptic Package Manager but they didn't remove so, how would I either remove them so i can install apache2 again or how would I restore my default apache2 settings.
  • PsyckBoy
  • Graduate
  • Graduate
  • PsyckBoy
  • Posts: 204
  • Loc: SoCal

Post 3+ Months Ago

If you've already uninstalled it, look in "Not Installed (residual config)" in Synaptic, right click Apache2, and select "Mark for Complete Removal". Then click Apply.
  • GeekSince3
  • Graduate
  • Graduate
  • GeekSince3
  • Posts: 133
  • Loc: I live in Virginia

Post 3+ Months Ago

Thanks PsyckBoy you were a big help, If anyone else was reading along I also used http://enterprise.linux.com/article.pl?sid=05/09/01/186204&tid=129 to get a better understanding of Apache2 config. files. I'm up and running now. Woo! :D Now onto PHP and MySQL
  • codeeater
  • Born
  • Born
  • codeeater
  • Posts: 2

Post 3+ Months Ago

Hi ,

I have a problem in Apache2. I changed my root directory to certain folder as in /var/www. I have php files under /html folder. Whenever I try to open any file under /html folder in web browser using link, it does not show anything.

This is how my "default" file looks like.
<code>

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/web/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
#
#<Directory /var/www/web/>
#<Directory /home/jenismodi/testFolder/>
# Options Indexes FollowSymLinks MultiViews
# AllowOverride None
# Order allow,deny
# allow from all
# </Directory>

# <Directory /var/www/web/html/>
#<Directory /home/jenismodi/testFolder/>
# Options Indexes FollowSymLinks MultiViews
# Order allow,deny
# allow from all
# </Directory>


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>
</code>

Can anyone tell me what am I doing wrong here ?

Thanks.
JM

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.