如何在 httpt.conf 中创建 http://abc.mysite.com

发布于 2024-10-26 11:46:56 字数 854 浏览 4 评论 0原文

我有一个运行良好的网站,位于:

/var/www/html/abcde

phpmyadmin 位于:

/var/www/html/myadmin

我的 httpd.conf 中有以下内容:

<VirtualHost *:80>
ServerName myadmin.mysite.com
DocumentRoot /var/www/html/myadmin
</VirtualHost>

我添加了一条 DNS 记录,因此 go to:

http://myadmin.mysite.com 

确实会转到一个链接,例如:

https://myadmin.mysite.com/?collat​​ion_connection=utf8_general_ci&token=d9383416a3547b7b0e569e048ca7caed&phpMyAdmin=899v1qg8t3s0o527qcgne0s5p2s2uijh

但是,显示的页面是“Apache 2 测试页”。我之前的同一文件夹位于:/var/www/html/abcde/myadmin,我只是将其移动到当前位置。

I have a website running fine which is located at:

/var/www/html/abcde

and phpmyadmin placed in:

/var/www/html/myadmin

And I have the following in my httpd.conf:

<VirtualHost *:80>
ServerName myadmin.mysite.com
DocumentRoot /var/www/html/myadmin
</VirtualHost>

I have added a DNS record, so that going to:

http://myadmin.mysite.com 

does go to a link such as:

https://myadmin.mysite.com/?collation_connection=utf8_general_ci&token=d9383416a3547b7b0e569e048ca7caed&phpMyAdmin=899v1qg8t3s0o527qcgne0s5p2s2uijh

However, the page which shows up is the "Apache 2 Test Page". I earlier had this same folder located at: /var/www/html/abcde/myadmin and I simply moved it to its present location.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

终遇你 2024-11-02 11:46:57

检查您的文件夹是否具有正确的权限,

您可以更改根文件夹的权限

sudo chmod -r 0755 rootfolder

,这是您的 httpd.conf 的样子

<VirtualHost 127.0.0.1:8888>
    ServerName myadmin.mysite.com

    DocumentRoot "/var/www/html/abcde"
    DirectoryIndex index.php
    <Directory /var/www/html/abcde>
      AllowOverride All
      Allow from All
    </Directory>

Check if you have the correct permissions on your folders

you can change the permission of your root folder

sudo chmod -r 0755 rootfolder

and here is how your httpd.conf should look like

<VirtualHost 127.0.0.1:8888>
    ServerName myadmin.mysite.com

    DocumentRoot "/var/www/html/abcde"
    DirectoryIndex index.php
    <Directory /var/www/html/abcde>
      AllowOverride All
      Allow from All
    </Directory>

泪意 2024-11-02 11:46:57

phpmyadmin 本身正在强制 SSL 连接

$cfg['ForceSSL'] = true;

我通过将其设置为 false 来禁用它,一切正常。

phpmyadmin itself was forcing a SSL connection

$cfg['ForceSSL'] = true;

I disabled that by setting it to false and everything worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文