M
M
Max2020-05-19 14:37:41
Apache HTTP Server
Max, 2020-05-19 14:37:41

How to put all sites in a directory?

Hello, panel vestacp, How to hang all sites in a directory?
in config I write:

<VirtualHost *:80>
  DocumentRoot /home/admin/web/catalog
  <Directory /home/admin/web/catalog>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php
    DirectoryIndex index.php
    Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:443>
  DocumentRoot /home/admin/web/catalog
  <Directory /home/admin/web/catalog>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php
    DirectoryIndex index.php
    Require all granted
  </Directory>
</VirtualHost>

but does not want to work, all the same, it refers to its directory.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Berkutman, 2020-05-22
@Berkutman

Can you tell me what OS? Debian, centos?
And so it is necessary in /etc/apache2/conf.d/vesta.conf , if the cent is there /etc/httpd
Add the path to the new config to Include and remove the old one.
Well, systemctl restart apache2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question