تنظیمات DNS

از پاپیروس
پرش به ناوبریپرش به جستجو
mkdir /var/www/html/subdmnfldr
chown -R apache: /var/www/html/subdmnfldr/
vim /etc/httpd/conf.d/subdmn.example.dmn.conf
<VirtualHost *:80>
    ServerName example.dmn
    ServerAlias subdmn.example.dmn
    ServerAdmin admin@example.dmn
    DocumentRoot /var/www/html/subdmnfldr

    <Directory /var/www/html/subdmnfldr>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>

    ErrorLog /var/log/httpd/subdmn.example.dmn-error.log
    CustomLog /var/log/httpd/subdmn.example.dmn-access.log combined
</VirtualHost>



vim /var/named/forward.zone
$TTL 86400
@   IN  SOA     ns1.example.dmn. root.example.dmn. (
        2017122301  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
;Name Server Information
@       IN  NS          ns1.example.dmn.
@       IN  NS          ns2.example.dmn.
@       IN  A           your.ip.goes.here
;Mail exchanger
example.dmn. IN  MX 10   mail.example.dmn.
;A - Record HostName To Ip Address
www     IN  A           your.ip.goes.here
mail    IN  A           your.ip.goes.here
subdmn  IN  A           your.ip.goes.here
ns1     IN  A           your.ip.goes.here
ns2     IN  A           your.ip.goes.here