0

when i change DocumentRoot of httpd.conf nothing happens. i found httpd.conf from here:

/usr/local/directadmin/data/user/paynitapp

my httpd.conf is: first

second

third

when i change this public_html to public_html/public nothing happen. still root directory is public_html

Sajjad
  • 1,536
  • 2
  • 17
  • 31
  • First make sure that you actually restart the service, second make sure that is the right file, for example put a definite syntax error into it and restart the service. Does it launch? – arkascha Sep 08 '18 at 14:41
  • yes, when i change and run "systemctl status httpd.service", i got an error: Syntax error on line 29 of /usr/local/directadmin/data/users/paynitapp/httpd.conf – Sajjad Sep 08 '18 at 14:46
  • OK, that is good. Next: make sure you are not looking at client side cached results. – arkascha Sep 08 '18 at 14:52
  • i always press cmd + shift + R for delete cache – Sajjad Sep 08 '18 at 14:54
  • That does not delete the cache, but indeed it should fully reload the requested URL. Better is to use an anonymous browser window. Anyway, the next option might be rewriting rules present in the host configurations or in dynamic configuration files. – arkascha Sep 08 '18 at 14:56
  • how can i do this? – Sajjad Sep 08 '18 at 14:59
  • Do what? Open an anonymous windows in your browser? Depends on your browser, actually, can't say anything about Mac browsers. Check for rewriting rules? Well, read about them, then you will be able to search for them in your configuration files. – arkascha Sep 08 '18 at 15:27
  • no, next option ... – Sajjad Sep 09 '18 at 06:48
  • Try changing the DocumentRoot, take care that this command is not used anywhere else in the configuration files. Then stop the service and restart it (instead of directly restarting it). Does it really start from scratch? What do you see in the http servers error log file when you perform those steps? – arkascha Sep 09 '18 at 19:11

1 Answers1

3

You can try this follow (DirectAdmin)

  • In Admin Level: access "Custom HTTPD Configurations"
  • In Custom HTTPD Configurations: Choose the domain you want to change DocumentRoot
  • Only add the few lines of the VirtualHost you need to insert. "|?DOCROOT=/home/USERHOSTING/domains/YOURDOMAIN/public_html/public|"