V
V
vladislav9972021-11-04 18:01:11
Apache HTTP Server
vladislav997, 2021-11-04 18:01:11

How to display a specific path from the main domain in a subdomain (video.domain.com displays domain.com/video)?

Tell me how to configure Apache on the VPS so that a subdomain displays a specific path from the main domain?

Example:
when visiting video.domain.com , should we see an analogue of domain.com/video ?

config

<IfModule mod_ssl.c>
<VirtualHost *:80>
ServerName http://domain.com
Redirect / https://domain.com
</VirtualHost>

<VirtualHost *:443>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /var/www/project/public
    <Directory /var/www/project/public>
        AllowOverride All
        Order Allow,Deny
        Allow from All
    </Directory>

ServerAlias www.domain.com
SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
</VirtualHost>
</IfModule>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question