1

Is there any way to obtain the absolute path of the apache userdir (the path that http://localhost/~username/ maps to, given that it is enabled in the apache configurations). A table, which UserDir directives correspond to which paths can be found at https://httpd.apache.org/docs/2.4/mod/mod_userdir.html. For example,

UserDir directive used  Translated path
UserDir public_html     ~bob/public_html/one/two.html
UserDir /usr/web        /usr/web/bob/one/two.html
UserDir /home/*/www     /home/bob/www/one/two.html

I want to get the "Translated path" (preferably as absolute path) for the user currently logged in, given that it is enabled in the apache configurations. Of course I can find out manually but my question is how to determine it automatically. My hope was that there is a functionality like apache2 --show-current-userdir that just prints it.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
phinz
  • 1,225
  • 10
  • 21
  • `cd ~/` takes you to the user dir of the authorized user. But i dont think apache has its own userdir so im confused to what exactly you are asking. – Jason Joslin May 01 '17 at 22:22
  • @JasonJoslin Yes, my question was not clear, I updated it. Thank you. – phinz May 02 '17 at 08:50

0 Answers0