AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-69936

Dan Dascalescu's questions

Martin Hope
Dan Dascalescu
Asked: 2015-05-11 10:18:31 +0800 CST

nginx 重定向,强制更新浏览器中的 URL

  • 4

我有一个非常基本的 nginx 设置重定向www.example.com到example.com,遵循最佳实践。它可以工作,在 Tor Firefox 浏览器中,访问 http://www.idorecall.com/blog确实会将地址栏中的 URL 更新为http://idorecall.com/blog。

但这不会改变 Chrome、Firefox Portable、IE 和 Opera Portable 的地址栏中的 URL。

这是修改后的defaultnginx 配置。除了 nginx.conf 之外,没有其他 nginx 配置文件。

server {
  server_name www.idorecall.com;
  return 301 $scheme://idorecall.com$request_uri;
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;

    index index.html index.htm index.nginx-debian.html;

    server_name idorecall.com;

    location / {
        try_files $uri $uri/ =404;
    }

    location /blog {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header HOST $http_host;

        proxy_pass http://127.0.0.1:2368;
    }
}

wget -S, http://www.rexswain.com/httpview.html , browsershots 等正确检测到 301“永久移动”重定向。大多数浏览器虽然保留 www URL。超级沮丧。Firefox 和 Opera 是从头开始安装的,因此 www 域没有历史记录。

GitHub 设法在每个浏览器中将 http(s)://www.github.com 重定向到https://github.com 。他们如何做到这一点?

nginx
  • 1 个回答
  • 4098 Views
Martin Hope
Dan Dascalescu
Asked: 2014-07-18 03:52:58 +0800 CST

我究竟如何安装 MongoDB 2.4,而不是最新版本?

  • 3

我已阅读有关安装旧版本的说明,但似乎 2.4 在 repos 中不再可用?

aptitude -y install mongodb-org-server=2.4
Unable to find a version "2.4" for the package "mongodb-org-server"
Unable to find a version "2.4" for the package "mongodb-org-server"
The following NEW packages will be installed:
  mongodb-org-server
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/9,416 kB of archives. After unpacking 23.7 MB will be used.
Selecting previously unselected package mongodb-org-server.
(Reading database ... 33931 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_2.6.3_amd64.deb ...
Unpacking mongodb-org-server (2.6.3) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up mongodb-org-server (2.6.3) ...
mongod start/running, process 30690

更新:我还向Mongo 的 JIRA 提交了一张票,该票已收到回复。

mongodb
  • 3 个回答
  • 17955 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve