WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to change apach root to internal HD?  (Read 1649 times)

Offline gmc

  • Full Member
  • ***
  • Posts: 141
How to change apach root to internal HD?
« on: May 16, 2019, 03:50:35 AM »
Greetings,

I have installed apache on TC10.  My goal is to use it to serve files for PXE booting. I would like to change server root to /mnt/sda1/netboot.  I have changed the config file to:

ServerRoot "/mnt/sda1/netboot"

but apache still defaults to /usr/local/apache2.

What might I be missing?

Thanks.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: How to change apach root to internal HD?
« Reply #1 on: May 16, 2019, 07:47:43 AM »
The directive you are looking for is DocumentRoot. You probably don't want to change ServerRoot because the modules are in there. Make sure the apache config file at /usr/local/etc/httpd/httpd.conf is in /opt/.filetool.lst so it is saved across reboots. If you only need to serve files for PXE maybe consider using lighttpd. It's what I use along with udpsvd for my bootp server to PXE boot my apache server, and it's a lot simpler.

Offline gmc

  • Full Member
  • ***
  • Posts: 141
Re: How to change apach root to internal HD?
« Reply #2 on: May 16, 2019, 10:33:48 AM »
Thank you Andyj.  You gave me just what I needed and a whole lot more.  I was following a tutorial I found at ParkyTowers using dnsmasq and TC.  I like dnsmasq because it is easy to set it up for proxy DHCP. This is all new to me so I am having a bit of a time learning all that I need to know.  I would like to learn a bit more about how you set up your system if it isn't too much trouble.  I am looking for something faster than tftp for PXE booting large ISO's.

Thank you again for the great answer.