A
A
Andrey2016-07-23 15:16:46
Apache HTTP Server
Andrey, 2016-07-23 15:16:46

How to select a folder for scripts in apache (public, www, html_public)?

I was tormented for a long time trying to find information on setting up apache configs, but I did not find an answer.
The question is, there is a config:

<VirtualHost *:80>

  UseCanonicalName Off

  LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
  CustomLog /home/andrey/server/access_log vcommon

  VirtualDocumentRoot /home/andrey/server/%-2/www
</VirtualHost>

Everything is set up, everything works, but the problem is that different projects work with different directories (public, www, html_public) and in each case you have to create .htaccess with a redirect to the desired folder, which is not very convenient.
I would like to know if it is possible somehow to prescribe the condition for selecting the desired folder in VirtualDocumentRoot.
Z.Y. I'm not very strong in Apache, I installed it as it was and set it up according to the article about multi-domain from habr (unfortunately I lost the link).
Z.Y. operating system Linux Mint 17
ZY Maybe I explained incorrectly. I would like to implement a mechanism similar to auto-search for domain folders in OpenServer10f8e1b4caf34248b28a85273bd2d367.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2016-07-23
@Sanes

What is the problem with specifying the path in a human way? Do not block bicycles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question