D
D
Dmitry2020-11-16 11:15:07
Apache HTTP Server
Dmitry, 2020-11-16 11:15:07

How to make multi-domain in Apache for Cyrillic domains?

Help to understand the problem of multi-domain in Apache for Cyrillic domains.
There is Apache / 2.4.29 it contains several business card sites with "ru", "com", "net" domains like name-site.ru, name-site.com, name-site.net everything works on the current config.
There was a need to use Cyrillic domains like "site-name.rf" or "site-name.su", but it does not work on the current config.
Tried using punycode to no avail.

# пакеты которые стоят
apt-get update
apt-get install apache2 vsftpd

#конфиг
nano /etc/vsftpd.conf

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
local_root=/var/www
chroot_local_user=YES
allow_writeable_chroot=YES
force_dot_files=YES
hide_ids=YES
pam_service_name=ftp
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftp.log

#конфиг
nano /etc/apache2/apache2.conf

<Directory /var/www/>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>


#конфиг
nano /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
        ServerAdmin [email protected]
        <If "%{HTTP_HOST} == '**.***.***.**'">
            Redirect 301 / http://qwtydfjazouvwwqxv.ru/
        </If>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^www\. [NC]
        RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
        RewriteRule ^ http://%1%{REQUEST_URI} [L,NE,R=301]
        RewriteCond %{LA-U:REQUEST_FILENAME}.html -f [NC]
        RewriteRule ^ %{LA-U:REQUEST_FILENAME}.html [L]
</VirtualHost>



#конфиг
nano /etc/apache2/conf-available/dynamic-vhosts.conf

UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog "${APACHE_LOG_DIR}/dynamic_access.log" vcommon
VirtualDocumentRoot "/var/www/%0"

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