ssl + nginx +阿帕奇+ php:链接仍然显示为 http,而不是 https
我使用的是 VBulletin Suite 4.1.4.,它是使用 PHP 和 nginx+apache 设置编写的(nginx 作为前端服务器,Apache 作为后端服务器)。这是一个非常标准的“nginx+apache”配置,nginx 在端口 80 上工作,apache 在端口 8080 上工作。我尝试启用 https 支持,但遇到了以下问题。
正如我在网上看到的,当一个人使用“nginx+apache”并且想要使用https时,他应该只为nginx服务器配置ssl。因此,我在 nginx vhost 配置中添加了所需的行。
listen 443;
server_name myserver.org;
ssl on;
ssl_certificate /tmp/myserver.crt;
ssl_certificate_key /tmp/myserver.key;
当我输入 https://... 时,vBulletin 论坛会以安全连接打开,浏览器右下角的锁会确认这一点,所以看起来我的设置有效。至少在某种程度上。
但是当我将鼠标移到页面上的链接上时,这些链接显示为 http 链接,而不是 https。因此,如果我想保持安全连接,我当然可以在每次打开新页面时手动添加字母“s”,但通常当您以 https:// 打开论坛时...所有显示的链接都应该自动更改到 https。
有什么想法为什么不会发生这种情况吗?
即使问题所在的答案 - (a) 在 nginx 配置中,或 (b) 在 apache 配置中,或 (c) 在 vbulletin 配置中也会有所帮助。
提前致谢!
I am using VBulletin Suite 4.1.4., which is written using PHP and nginx+apache setup (nginx as the front end server and Apache as the back-end server). This is a pretty standard "nginx+apache" configuration with nginx working on port 80 and apache on port 8080. I tried to enable https support and ran into the following problem.
As I read on the web, when one uses "nginx+apache" and wants to have https, he should configure ssl only for nginx server. So, I added required lines into nginx vhost configuration
listen 443;
server_name myserver.org;
ssl on;
ssl_certificate /tmp/myserver.crt;
ssl_certificate_key /tmp/myserver.key;
When I type https://.... the vBulletin forum opens in secure connection and the lock in the right bottom corner of the browser confirms it, so it looks like my settings work. At least to some extent.
But when I bring the mouse over links on the page, these links are showed as http links, not https. So, if I want to stay in secure connection, I can of course add the letter "s" manually each time I open a new page, but normally when you open forum as https://... all displayed links should automatically change to https.
Any ideas why this does not happen?
Even the answer where the problem lies - (a) in nginx configuration, or (b) in apache configuration or (c) in vbulletin configuration would help.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是在 apache 上运行的 vBulletin 检测到的是 HTTP 协议,而不是 HTTPS。但是,您可以通过以下方式在管理面板中更改 vbulletin 设置:
论坛 URL 更改为“https://your-site.name”
始终使用论坛URL 作为基本路径 为“是”
The problem is that vBulletin running on apache detects the HTTP protocol, not HTTPS. But, you can change vbulletin settings in the admin panel in the following way:
Forum URL to 'https://your-site.name'
Always use Forum URL as Base Path to 'yes'