如何在 Linux / Debian 上打开端口 555

如何在 Linux / Debian 上打开端口 555

我希望 phpmyadmin 在 mysite.com:555 (555 端口)上工作

# phpMyAdmin default Apache configuration
<VirtualHost *:555>
Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
    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_value include_path .
    </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
    AuthType Basic
    AuthName "phpMyAdmin Setup"
    AuthUserFile /etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Order Deny,Allow
    Deny from All
</Directory>
</VirtualHost>

但是 mysite.com:555 不起作用....

答案1

因为这似乎是一个 Apache 配置,所以我怀疑您还需要向(针对 Debian)添加一条Listen指令。/etc/apache2/ports.conf

它应该是Listen 555

答案2

你必须Listen 555在你的/etc/apache2/ports.conf文件中添加

相关内容