2

-大家好,我只是租了一台专用服务器(ubuntu 12.4)并安装了apache + php,mySQL等......但是使用SSH创建域(虚拟主机)有点费力所以我决定安装一些GUI管理面板,还决定使用 ZPanelcp 的最新版本,所以一切都安装得很好,没有错误,我第一次设置了两个域,例如:

new.domain.com

new.otherdomain.com

这些域在没有为这些域设置 zpanel DNS 的情况下已成功激活,但第二天我注意到当我尝试在我的 ZPanel 中再次创建其他域时显示为“实时”但在我的网络浏览器中看不到,所以实际上它们没有被激活,好的第一次我再次运行守护程序并重新启动 BIND 也重新启动 apache 我尝试在我的服务器 conf 文件中进行一些更改但没有我重新启动我的服务器也没有我的服务器使用一个静态 IP。

这是我的 Zpanel,apache2 conf 文件。

Apache2 文件:

文件夹文件:

/etc/apache2/apache2.conf

# Here is last lines of this files  related to my problem
# Include of directories ignores editors' and dpkg's backup files,
# see the comments above for details.

# Include generic snippets of statements
Include conf.d/

# Include the virtual host configurations:
Include sites-enabled/


ServerName cp.zpanel.com
Include /etc/zpanel/configs/apache/httpd.conf

/etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

/etc/apache2/sites-enabled/000-default

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/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 All
                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>

/etc/apache2/sites-available/default

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /var/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 All
                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>

/etc/zpanel/configs/apache/httpd.conf

# ZPanel Apache Include file for CentOS Linux
# Written by Bobby Allen, 15/05/2011

# Set the Zpanel Alias (used for development, sable will eventually use a VHOST)
Alias /zpanel /etc/zpanel/panel

# Setup the directory settings and PHP security flags for the Zpanel application directory.
<Directory /etc/zpanel/panel>
        Options FollowSymLinks
        DirectoryIndex index.php
        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php
                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_value upload_tmp_dir /var/zpanel/temp
        </IfModule>

</Directory>

# Disallow web access to directories that don't need it/that we don't want people looking in!
<Directory /etc/zpanel/panel/cnf>
    Order Deny,Allow
    Deny from All
</Directory>

# Set server tokens (security??)
ServerTokens Maj

# Now we include the generic VHOST configuration file that holds all the ZPanel user hosted vhost data
Include /etc/zpanel/configs/apache/httpd-vhosts.conf

/etc/zpanel/configs/apache/httpd-vhosts.conf

################################################################
# Apache VHOST configuration file
# Automatically generated by ZPanel 10.0.1
# Generated on: 09:15 13th Dec 2012 CET
################################################################

NameVirtualHost *:80

# Configuration for ZPanel control panel.
<VirtualHost *:80>
ServerAdmin zadmin@localhost
DocumentRoot "/etc/zpanel/panel/"
ServerName cp.zpanel.com
ServerAlias *.cp.zpanel.com
AddType application/x-httpd-php .php
<Directory "/etc/zpanel/panel/">
Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
</Directory>

# Custom settings are loaded below this line (if any exist)

</VirtualHost>

################################################################
# ZPanel generated VHOST configurations below.....
################################################################


# DOMAIN: new.domain.com
<virtualhost *:80>
ServerName new.domain.com
ServerAlias new.domain.com www.new.domain.com
ServerAdmin zadmin@localhost
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/new_domain_com"
php_admin_value open_basedir "/var/zpanel/hostdata/zadmin/public_html/new_domain_com:/var/zpanel/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_$
ErrorLog "/var/zpanel/logs/domains/zadmin/new.domain.com-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/new.domain.com-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/new.domain.com-bandwidth.log" common
<Directory />
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
AddType application/x-httpd-php .php3 .php
ScriptAlias /cgi-bin/ "/_cgi-bin/"
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options ExecCGI -Indexes
</location>
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 510 /_errorpages/510.html
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
# Custom Global Settings (if any exist)

# Custom VH settings (if any exist)

</virtualhost>
# END DOMAIN: new.domain.com
################################################################
##ETC other domains##

/etc/hosts

### Hetzner Online AG installimage
# nameserver config
# IPv4
127.0.0.1 localhost
6.8.81.52  Ubuntu-1210-quantal-64-minimal
#
# IPv6
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
4

1 回答 1

0

检查 httpd-vhosts.conf 文件的权限。也许你没有写权限。

于 2013-10-27T10:59:02.387 回答