我在非标准端口上使用我的应用程序的testing实例,并希望使用nginx将所有传入的http请求redirect到https 这是我的nginxconfiguration: I tried the above but Cant seem to get it working : please see below …… include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; server { listen 9000; server_name iossapp1.com; if ($scheme = 'http') { rewrite ^ https://$server_name:9443$request_uri? permanent; } } ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; server { listen 9443 ssl; server_name iossapp1.com; error_page 497 https://$host:9443$request_uri; location / […]
我有一个映射到端口80(Windows,XAMPP http://www.apachefriends.org/en/xampp.html )的本地Web服务器和指向本地Web服务器的IP的域“mydomain.com”。 一切都很好。 现在我正在尝试使用内置的Web服务器在8080端口上运行另一个程序。 理想情况下,我不想让我的路由器上的端口80和端口8080到这台机器。 我可以,但我想要做的是inputmydomain.com/application或app.mydomain.com而不是mydomain.com:8080。 很好,干净,只有端口80需要被转发。 我不知道该怎么做,或者甚至有可能。 打开所有build议&apache / htaccess / php / perl /端口转发技巧。 我的谷歌失败了我。 干杯!
我很抱歉,如果之前已经问过这个问题,但是我已经在这里看了很多问题,他们都没有回答我的问题。 我有一系列域指向我的服务器。 对于每一个我已经设置它的IPlogging,并正确地在http.conf中configuration一个VirtualHost,如下所示: # example.com <VirtualHost *:80> DocumentRoot /path/to/example ServerName example.com ServerAlias example.com ServerAlias www.example.com </VirtualHost> # other.com <VirtualHost *:80> DocumentRoot /path/to/other ServerName other.com ServerAlias other.com ServerAlias www.other.com </VirtualHost> 现在我在我的服务器上为test.other.com设置了一个IP,我想将其redirect到一个完全的其他网站:test.blogspot.com(因为它移动了)。 我尝试了以下,但它将所有网站redirect到该网站 # other.com <VirtualHost *:80> ServerName test.other.com ServerAlias test.other.com Redirect / http://test.blogspot.com/ </VirtualHost> 我想这是因为“/”? 不太确定。 我试过VirtualHost test.other.com:80但没有工作。 我尝试了一堆东西,没有工作,所以我真的需要你的帮助。 提前致谢。
我们漫游用户configuration文件遇到一些奇怪的东西。 我们使用文件夹redirect的文件/图片/音乐/ Destkop /下载,但这些文件夹正在创build漫游用户configuration文件(他们不应该)。 看看这些文件夹的date是很明显的,我们正在打击一些与NTFS的错误。 这还有什么可能(图片)?
我有一个网站说xyzuniversity.com/north。 我想redirectcollege.com使用Windows DNS条目redirect到xyzuniversity.com/north。 有没有一个过程来做到这一点? 还有什么可能的方法来做到这一点。 提前致谢!!
我想从SPIP切换到Wordpress,并将所有SPIP的URLredirect到Wordpress。 SPIP URL的格式为: example.com/spip.php?article{ID} article{ID example.com/spip.php?article{ID} ,例如: example.com/spip.php?article123 article123 WordPress URL的格式是: example.com/?p={ID} ,例如: example.com/?p=123 如果我将所有的数据转移到Wordpress下相同的ID将意味着example.com/spip.php?article123是example.com/?p=123 我的问题是:我真的这么做? 我已经search了很多论坛,以及如何find方法来将具有特定模式(没有问号)的页面转移到具有问号的新模式。
部分.htaccess文件在某些页面上强制https (例如,当用户login时,input信用卡信息等),同时在所有其他页面上强制http 。 这似乎是我需要的理想设置。 但是,我的网站的其中一个分机负责生成信用卡处理表单。 在表单的动作url中,它包含了web根目录的https url(例如https://domain.com/ )。 但是,web根目录不是.htaccess强制https页面之一,因此它强制redirect到http 。 正因为如此,该扩展失败,因为该表单正试图提交到一个httpsredirect到http 。 我该怎么办? 我不希望用户在不需要时查看受保护的页面; 我宁愿他们收获caching的好处。 显然,在受保护的页面上,他们需要提交到安全的URL(我的网站的CMS显然是这样工作的,所有表单提交到web根目录工作得很好)。 我无法告诉扩展程序提交到不同的URL。 以下是我的.htaccess的相关部分: <IfModule mod_rewrite.c> RewriteEngine On # Define default protocol for all assets RewriteRule ^ – [E=protocol:http,E=ssl:%{HTTPS}off] # Define HTTPS targets, add more cond as required RewriteCond $1 (payment|sign-in|sign-up) [NC] RewriteRule (.*) – [E=protocol:https,E=ssl:%{HTTPS}on] # Rewrite host if necessary […]
我有CloudFlare的通用SSL。 我想在我的Ghost博客上build立一个永久SSLredirect。 这是我的原始configuration。 它可以单独使用http://example.com和https://example.com server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; server_name example.com; # Replace with your domain root /usr/share/nginx/html; index index.html index.htm; client_max_body_size 10G; location / { proxy_pass http://localhost:2368; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; } } 这是我尝试configuration为从HTTPredirect到HTTPS,但它导致redirect循环 server { listen 80 default_server; server_name example.com; return 301 […]
我正在为Proxmox 4服务器设置一个脚本,用于从Proxmox 3.4迁移OpenVZ转储。 脚本scp备份,恢复它们等等。 在这个过程中,我想擦除/ etc / network / interfaces并使用“pct set”设置一个新的。 我的问题是:将默认的基本configuration写入/ etc / network / interface,我使用lxt-attach。 我错误地使用了这个: lxc-attach -n 101 — echo "auto lo" > /etc/network/interfaces 你明白了:我擦掉了主机的networkingconfiguration。 那么有人可以告诉我如何执行这个命令: echo "auto lo" > /etc/network/interfaces 在一个使用lxc-attach的容器中? 非常感谢 ;)
我正在使用Apache 2.4来托pipe这些域名: domena.pl/ domena.pl/ru domena.pl/en 我需要将domena.comredirect到domena.pl/en。 这是我的htacces文件: RewriteCond %{HTTP_HOST} ^(www\.)?domena\.ru RewriteCond %{REQUEST_URI} "^/pl$" RewriteRule ^(.*)$ http://www.domena.pl/pl [R=303,NC,L] RewriteCond %{HTTP_HOST} ^(www\.)?domena\.ru RewriteCond %{REQUEST_URI} "^/$" RewriteRule ^(.*)$ http://www.domena.ru/ru [R=303,NC,L] RewriteCond %{HTTP_HOST} !^(www.domena.pl|www.domena.ru)$ RewriteRule ^(.*)$ http://www.domena.pl/$1 [R=301,L] RewriteCond %{REQUEST_METHOD} GET RewriteCond %{DOCUMENT_ROOT}/cached/index.html -f RewriteRule ^/*$ cached/index.html [L]