Domain, hosting, vps giá rẻ
Kết quả 1 đến 1 của 1

Chủ đề: [Apache] Creat domain to directory - Dns domain vào thư mục vps

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    nghiatichxanh1992's Avatar
    Bài viết
    5,038
    Cấp độ
    Bang hội
    Tiếu Ngạo
    Tu luyện
    Độ kiếp Hư Thần
    Giới tính
    Con trai
    Join Date
    Jun 2012
    Đến từ
    Hà Giang
    Tuổi
    31
    Danh vọng
    10
    Điện thoại
    0367790762

    [Apache] Creat domain to directory - Dns domain vào thư mục vps

    Apache: [warn] _default_ VirtualHost overlap on port 80, the first has precedence Error and Solution

    Question: I'm using Apache 2 to host multiple site on a single host using Apache name based VirtualHost feature. However, Apache is displaying lots of warning as follows:

    Mã:
    Performing sanity check on apache22 configuration:
    [Portal Oct 05 06:59:34 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
    [Portal Oct 05 06:59:34 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
    [Portal Oct 05 06:59:34 2008] [warn] NameVirtualHost 81.aaa.www.yyy:80 has no VirtualHosts
    Syntax OK
    Stopping apache22.
    Waiting for PIDS: 14968.
    Syntax OK
    Starting apache22.
    [Portal Oct 05 06:59:36 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
    [Portal Oct 05 06:59:36 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
    [Portal Oct 05 06:59:36 2008] [warn] NameVirtualHost 81.aaa.www.yyy:80 has no VirtualHosts
    How do I fix this warning and host multiple websites under UNIX / Linux Apache 2 webserver?

    Answer: The NameVirtualHost directive is a required to configure name-based virtual hosts. Add this to your httpd.conf file to fix this issue. Open httpd.conf file:
    Mã:
    # vi /etc/httpd/conf/httpd.conf
    Add NameVirtualHost as follows:
    Mã:
    NameVirtualHost *:80
    OR add server IP:
    Mã:
    NameVirtualHost 202.54.1.1:80
    Save and close the file. Restart httpd web server under RHEL / Red Hat / Fedora / CentOS Linux:
    Mã:
    # service httpd restart
    OR type the following to restart Apache 2 under Debian / Ubuntu Linux:

    Sample Apache 2 Virtual hosting configuration:

    If you want to maintain multiple domains/hostnames on your machine you can setup VirtualHost containers for them. Most configurations use only name-based virtual hosts so the server doesn't need to worry about IP addresses. This is indicated by the asterisks in the directives below.

    Mã:
    # My Virtual Hosts Config File for Two Domains
    
    NameVirtualHost *:80
     
    <VirtualHost *:80>
        ServerAdmin webmaster@theos.in
        DocumentRoot "/usr/local/docs/theos.in"
        ServerName www.theos.in
        ServerAlias theos.in
        ErrorLog "/var/log/theos.in-error_log"
        CustomLog "/var/log/theos.in-access_log" common
       <Directory "/var/www/abc">
          Options			FollowSymLinks
          AllowOverride	All
       </Directory>	
    </VirtualHost>
     
    <VirtualHost *:80>
        ServerAdmin webmaster@nixcraft.com
        DocumentRoot "/usr/local/docs/nixcraft.com"
        ServerName www.nixcraft.com
        ServerAlias nixcraft.com
        ErrorLog "/var/log/nixcraft.com-error_log"
        CustomLog "/var/log/nixcraft.com-access_log" common
       <Directory "/var/www/abc">
          Options			FollowSymLinks
          AllowOverride	All
       </Directory>	
    </VirtualHost>
    View more: http://www.cyberciti.biz/faq/warn-_d...hasprecedence/
    Lần sửa cuối bởi nghiatichxanh1992, ngày 25/08/2014 lúc 1:31.
    Diễn đàn chia sẻ kiến thức điện thoại: http://chiase123.com
    Click vào Hiện ra để xem chữ ký của mình

Thông tin về chủ đề này

Users Browsing this Thread

Có 1 người đang xem chủ đề. (0 thành viên và 1 khách)

Các Chủ đề tương tự

  1. [Kloxo] Sửa lỗi add domain trong host kloxo
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 11/03/2014, 15:03
  2. [VPS Linux] Hướng dẫn cài đặt Apache, MySQL, PHP để chạy 1 trang web
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 04/02/2014, 23:48
  3. [Hướng dẫn] Fix lỗi không khởi động được Apache
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 29/01/2014, 13:42
  4. [Linux] Hướng dẫn xóa (uninstall) mysql, apache và php
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 15/11/2013, 19:57
  5. [Game PC] Binary Domain
    Bởi nghiatichxanh1992 trong diễn đàn Thể loại khác
    Trả lời: 0
    Bài viết cuối: 02/04/2013, 23:21
  6. Chống slowloris DDoS cho Apache với Mod_qos
    Bởi nghiatichxanh1992 trong diễn đàn PHP & MySQL
    Trả lời: 1
    Bài viết cuối: 01/02/2013, 10:56
  7. [VPS linux] Hướng dẫn update php, mysql, apache phiên bản mới nhất
    Bởi nghiatichxanh1992 trong diễn đàn VPS - Server
    Trả lời: 0
    Bài viết cuối: 21/01/2013, 20:23
  8. Cài đặt mod (D)DoS-Deflate chống DDOS cho server Apache
    Bởi nghiatichxanh1992 trong diễn đàn PHP & MySQL
    Trả lời: 0
    Bài viết cuối: 17/12/2012, 10:03
  9. [Game PC] Apache: Air Assault [ Mô phổng / Full 1 link 2.1 Gb ]
    Bởi nghiatichxanh1992 trong diễn đàn Thể loại khác
    Trả lời: 0
    Bài viết cuối: 29/11/2012, 15:23

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •