Find the answer to your Linux question:
Results 1 to 6 of 6
Hi guys, I'm setting up Apache on Suse 10.2 and have some beginner's problems. The issue I came across is changing the default root directory when a client requests my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162

    How to change root directory on Apache?


    Hi guys, I'm setting up Apache on Suse 10.2 and have some beginner's problems. The issue I came across is changing the default root directory when a client requests my page. I have registered a free domain like http://mydomain.dyndns.org, while my web page resides in \srv\www\htdocs\page directory. Now when I enter the domain name in the broser I get just the "It works" message. I would like that when the user enters http://mydomain.dyndns..org in the browser he gets my page residing in \srv\www\htdocs\page, how can I do that. I went through the settings of Apache, but I just can't figure out the problem. First I thougt I have to define virtual host in Apache, but it dindn't work. Thanks for help.

  2. #2
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    hi,


    open httpd.conf and change DocumentRoot to whatever you want to be your root directory.
    Linux and me it's a love story

  3. #3
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Thanks khafa, but there is no such switch in /ect/apache2/httpd.conf, any other idea maybe

  4. #4
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    and in default-server.conf ?
    Linux and me it's a love story

  5. #5
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Yes it is and it works, khafa thanks a lot

  6. #6
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    glad to hear.
    Linux and me it's a love story

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •