Answer the question
In order to leave comments, you need to log in
Debian 7, how to set up a subdomain?
I use a DNS server from Yandex, the script is divided into frontend and backend (admin panel), I configured the front end, created /etc/apache2/sites-available/site.ru.conf where it redirects to frontend/www, everything works, now I want to configure admin panel at admin.site.ru redirecting to backend/www, , tried to set it up as the main domain but it doesn't work The server was not found, what should I do?
created sudo nano /etc/apache2/sites-available/site.ru.conf
in it
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName сайт.ру
ServerSignature Off
DocumentRoot /var/www/сайт.ру/frontend/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/сайт.ру/frontend/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName admins.сайт.ру
DocumentRoot /var/www/сайт.ру/backend/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/сайт.ру/backend/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question