Hi, :)
Always change the default setting. That's a word my friend always told me. Ok now i will show you how to edit the default apache 2 publishing directory. By the way, this howto is on ubuntu 10.04 server edition. It can be applied to ubuntu 9.10, 9.04, 8.10 and 8.04. NOt so sure for the older version of it.
Ubuntu have its own way to manage the apache files. They splitted httpd files into files called mods_available, sites_available and so on. That means, there's no single file named httpd.conf anymore.All that files stored nicely at /etc/apache2/
From our default installation for LAMP Server, our website or apps will be stored at /var/www/. Almost every version of ubuntu is the same. NOw for extra security, we need to change this directory to our own directory. Here is how i done it :-
# ssh into your server, for example :- ssh 10.23.140.222 -l dzul
# after successfully login, switch to root by issuing the following command ,
sudo su
and enter your password once again
you're now root!
then cd to /etc/apache2 dir
then go directory name sites_available
now, make sure you have two files on it, which is default and default-ssl
we need to edit the default file, so at the terminal :-
# nano default
[nano is the editor, it is up to you to use other editor like vi or vim.]
make some changes there.
let say you wanted to host your file at /var/web/dzul then you the change the line /var/www to /var/web/dzul
ctrl+x to save
now make your directory under /var
# mkdir web
# cd web
# mkdir dzul
# cd dzul
# pwd
# /var/web/dzul
now your /var/web/dzul is created.
it's time to restart the apache service.
# /etc/init.d/apache2 restart
If there's no errors, you're successfully make changes of ubuntu apache default publishing directory. Get your files and dump it into /var/web/dzul
But before that you need to chown and chmod user dzul to use that directory. Remember, ONLY root can access everything in your system. To accomplish that, issue the following command :-
# chown root:dzul /var/web/dzul/
# chmod g+w /var/web/dzul/
now you're ready to rock!
skip to main |
skip to sidebar
Monday, July 5, 2010
Labels
- iPhone (8)
- Joomla (3)
- Mobile Phones (3)
- My Life (7)
- Photologs (3)
- Tips and Tricks (4)
- Ubuntu Stuff (14)
Blog Archive
-
▼
2010
(43)
-
▼
July
(17)
- How to allow authors to auto-publish in Joomla 1.5.x
- ffmpeg is cool!!! :)
- Downloading youtube videos without 3rd party plug-...
- Iphone 2g : Jailbreak iPhone OS 3.1.3 Firmware wit...
- How to Create Bootable Linux USB Flash/Pen Drive f...
- Changing your default apache publishing directory
- Installing phpmyadmin on ubuntu server 10.04 lucid...
- Setting Up Webserver using Ubuntu 10.04 [part 3]
- Setting Up Webserver using Ubuntu 10.04 [part 2]
- Setting Up Webserver using Ubuntu 10.04 [part 1]
- Unlock almost all nokia models security code
- Streamyx dns
- Hardening your Apache and PHP on Ubuntu 9.04 Server
- I'm losing my root password
- Command line is everything... :)
- Hack and crack that WEP keys!
- Ubuntu 10.04 is called lucid lynx
-
▼
July
(17)
Pages
dr rude's blog |. Powered by Blogger.
Blog Archive
-
▼
2010
(43)
-
▼
July
(17)
- How to allow authors to auto-publish in Joomla 1.5.x
- ffmpeg is cool!!! :)
- Downloading youtube videos without 3rd party plug-...
- Iphone 2g : Jailbreak iPhone OS 3.1.3 Firmware wit...
- How to Create Bootable Linux USB Flash/Pen Drive f...
- Changing your default apache publishing directory
- Installing phpmyadmin on ubuntu server 10.04 lucid...
- Setting Up Webserver using Ubuntu 10.04 [part 3]
- Setting Up Webserver using Ubuntu 10.04 [part 2]
- Setting Up Webserver using Ubuntu 10.04 [part 1]
- Unlock almost all nokia models security code
- Streamyx dns
- Hardening your Apache and PHP on Ubuntu 9.04 Server
- I'm losing my root password
- Command line is everything... :)
- Hack and crack that WEP keys!
- Ubuntu 10.04 is called lucid lynx
-
▼
July
(17)
0 comments:
Post a Comment