Tôi đã sử dụng Apache2 trong một thời gian dài. Hầu hết thời gian tôi sử dụng "máy chủ ảo", nhưng tôi chỉ yêu cầu nhà cung cấp của tôi thay đổi tôi từ địa chỉ "chia sẻ ip" thành địa chỉ "ip cố định".
Đó là khi tất cả đã đi vào địa ngục. Tất cả những gì họ nên làm là thay đổi địa chỉ IP của tôi.
Đây là cấu hình của tôi:
/etc/httpd/confcó httpd.conftập tin của tôi Dòng cuối cùng của nó là
Include conf/vhosts.con
vhostsTập tin của tôi chứa:  
NameVirtualHost *:80  
<VirtualHost *:80>  
</VirtualHost>
<Directory "/export/home">
  Options Includes ExecCGI Indexes  
  AddHandler cgi-script .pl  
  AllowOverride AuthConfig  
  Order allow,deny  
  Allow from all  
</Directory>
Include conf/webs/website.com
Include conf/webs/web1.com
Vì vậy, mỗi máy chủ ảo phải giống nhau với tất cả các quyền - dễ dàng, phải không? Và mỗi máy chủ là tập tin riêng của nó.
web1 là một máy chủ điển hình .. và có quyền truy cập vào mysql.
web1.biz:
<VirtualHost *:80>
  ServerName web1.biz
  ServerAlias http://www.web1.biz
  DocumentRoot /export/home/webs/web1/public_html
  ErrorLog /var/log/www/web1/error.log
  TransferLog /var/log/www/web1/transfer.log
</VirtualHost>
Trang mạng:
Đây là trang web chính của tôi có quyền truy cập vào mysql myaddmin /var/www/html/pma  để tôi có một liên kết /export/home/webs/website/public_htmlđến /var/www/html/pma. Nhưng trước khi họ thay đổi địa chỉ của tôi, nó hoạt động tốt .. với cấu hình trên.
Đây là cấu hình hiện tại của tôi nhưng tôi vẫn gặp lỗi "Cấm" khi tôi cố gắng bắt đầu phpmyaddmin:
<VirtualHost *:80>
  ServerName website.net
  ServerAlias http://www.website.net
  DocumentRoot /export/home/webs/website/public_html
  DirectoryIndex index.html index.shtml index.pl index.php
  <Directory />
    Options Includes ExecCGI FollowSymLinks
    AllowOverride Indexes
  </Directory>
  ErrorLog /var/log/www/website/error.log
  TransferLog /var/log/www/website/transfer.log
</VirtualHost>