如何在apache中为phpmyadmin创建别名?

时间:2018-04-12 18:52:18

标签: apache phpmyadmin

使用Ubuntu 16.04,apache2。

我在apache中有以下虚拟主机,但我的网址http://example.com/phpmyadmin给出了404错误。有什么想法吗?

从查看其他stackoverflow帖子,这个应该工作,但它不起作用。我对Linux / Apache世界相当陌生(如果这是在IIS上我就没问题!)所以,如果你能提供任何指示,也会受到赞赏。

<VirtualHost *:80>
ServerName example.org

Alias /phpmyadmin/ /user/share/phpmyadmin/

DocumentRoot "/var/www/html"

<Directory /usr/share/phpmyadmin>
    Require all granted
    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_flag allow_url_fopen Off
    php_value include_path .
    php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
    php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
</IfModule>
</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>

<Directory "/var/www/html">
allow from all
Options None
Require all granted
</Directory>
</VirtualHost>

提前致谢。

0 个答案:

没有答案