# WebServer



## SuperMiguel (Jun 10, 2009)

In this guide http://www.freebsdmadeeasy.com/tutorials/web-server/configure-apache-web-server-on-freebsd.php

Is suggested to run:

mv /usr/local/www/apache22 /usr/local/www/
and
sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf

do i need to run this? what is it for?


----------



## roddierod (Jun 10, 2009)

sarep is some kind of search and replace tool from the ports.

What you are doing here is replacing the line in httpd.conf such as


```
DocumentRoot "/usr/local/www/apache22/data"
```

with this:


```
DocumentRoot "/usr/local/www/data"
```

It will also replace other lines that reference /usr/local/www/apache22 to just /usr/local/www

If you follow the guide and change you installation from /usr/local/www/apache22 then you will need to change the DocumentRoot, although I don't think you should install a port to do it when it is pretty simple.


----------



## SuperMiguel (Jun 10, 2009)

sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf

so all this does is... where if it says "/usr/local/www/apache22" in the documment httpd.conf change it to "/usr/local/www"??

ohh easy enough.. And i should do this correct? is good practice to change from /usr/local/www/apache22 to /usr/local/www


----------



## roddierod (Jun 10, 2009)

SuperMiguel said:
			
		

> sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf
> 
> so all this does is... where if it says "/usr/local/www/apache22" in the documment httpd.conf change it to "/usr/local/www"??



Yes.




> ohh easy enough.. And i should do this correct? is good practice to change from /usr/local/www/apache22 to /usr/local/www



Well as for good practice, I really can't speak on that. Apache 1.x used to install in /use/local/www and Apache 2.2 installed in /usr/local/www/Apache22 to help when upgrading from 1.x. Since I upgraded my websites from 1.x I just have kept everything in /usr/local/www/Apache22.


----------



## SuperMiguel (Jun 10, 2009)

i guess it wont matter if u know where the files are supposed to be right


----------



## roddierod (Jun 10, 2009)

Yup.


----------



## SuperMiguel (Jun 10, 2009)

tHANK U


----------

