我以前的问题太复杂也不清楚。 希望这更直接点… 目前我正在使用子域从外部访问应用程序UI。 有些允许通过path访问: example.com/sabnzbd 其他人不使用path(获得404错误),并需要子域名: dsm.example.com 基本上 – 我试图使用只有path访问各种后端: 我是在example.com/plex之后,而不是plex.example.com 而不是dsm.example.com我在example.com/dsm之后 Sabnzbd的作品,因为它允许我configuration一个URL基地(设置为/ sabnzbd)。 至于plex和dsm的例子,我假设/ plex和/ dsm不存在于他们各自的web服务器上,因此为我服务了404。 所以我想弄清楚如何去掉后端的请求中的/ plex和/ dsmpath(但是把它们留在URL栏中)。 这可能吗?
我目前有我的服务器在my.server.com nginx设置。 使用当前configuration,我使用http://my.server.com/app1或http://my.server.com/app2访问不同的应用程序。 我有一个apps.conf放置在/etc/nginx/sites-enabled/是这样的: upstream app1_servers { server 172.12.11.10:8080; } upstream app2_servers{ server 172.12.11.10:9090; } server { listen 80; server_name my.server.com; return 301 https://my.server.com/$request_uri; #force https } server { listen 443; ssl on; ssl_certificate /etc/ssl/my.server.com/cert.pem; ssl_certificate_key /etc/ssl/my.server.com/priv.pem; server_name my.server.com; location /app1 { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Proto https; proxy_pass […]
我想要将所有子域redirect到用户configuration文件,例如: redirect这个URL: http://alexusername.example.com : http://alexusername.example.com 要: http://alexusername.example.com : http://alexusername.example.com 但是显示的内容是: http://example.com/user.php?q=alexusername : http://example.com/user.php?q=alexusername 我的意思是我想显示http://example.com/user.php?q=alexusername的内容而不改变浏览器中的URL我希望它仍然http://alexusername.example.com 我试过这个: <IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond %{HTTP_HOST} !www.blackhawk.site$ [NC] RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).blackhawk.site [NC] RewriteRule ^(.*)$ http://blackhawk.site/user.php?q=%2 [L] </IfModule>
我有一个静态的公共IP地址的服务器。 我也有一个注册的域名。 为了说明,让我们假设他们是 IP地址: 12.34.56.78 域名: example.com 我有一台机器运行以下内容: 一个网站(在IIS7上)在localhost:80可用localhost:80 JetBrains TeamCity实例(通过Tomcat)在localhost:1234本地可用 一个VisualSVN服务器实例(通过Apache)在localhost:5678/svn可用localhost:5678/svn 我为example.com和以下CNAMEloggingbuild立了一个Alogging: www.example.com builds.example.com sources.example.com 我想configurationTomcat和Apache,使: 如果我将浏览器指向builds.example.com ,那么最终会出现在JetBrains TeamCity实例中, 如果我将我的浏览器指向sources.example.com ,那么我最终将在VisualSVN Server实例上运行。 我想我可以将Apacheconfiguration为vhost example.com:5678/svn指向sources.example.com ,并将以下行添加到Apache httpd.conf文件 Listen 5678 NameVirtualHost *:5678 <VistualHost *:5678> ServerName sources.example.com DocumentRoot /svn </virtualHost> 这打破了VisualSVN的实例,所以我不得不恢复到 Listen 5678 帮帮我!
让我们说我有两个子域名: http : //content.mydomain.com和http://app.mydomain.com 。 http://content.mydomain.com是指向一个不同的服务器比http://app.mydomain.com是。 有没有办法让http://app.domain/content url指向http://content.mydomain.com没有在浏览器中的url更改为子域? 我试图让这个工作在IIS 7/6和有问题。 任何build议将不胜感激!
我试图设置内部通配符子域指向我的Apache虚拟主机configuration(工作正常)。 问题是,Windows主机文件不能支持通配符子域名,所以我希望我的路由器和/或其他解决scheme可以协助。 我有一个十亿7404VGOX路由器,但不能在pipe理员看到任何选项来configuration此。 任何build议感激地收到。 谢谢,JD
这是我的情况 家庭networking,Windows机器,1个面向外部的IP地址(允许端口80)1个Windows家庭服务器始终在机器上,计划升级到WHS 2011不久。 几台使用自己的networking服务器并直接访问的IP摄像机。 我的问题/目标: 我喜欢能够从外部访问我的家庭networking上的IP摄像机和服务器,通过子端口,通过端口80.即:cam1.mydomain.com,cam2.mydomain.com,nas.mydomain.com等 他们目前已经build立了端口转发,但是我所处的很多networking都locking了所有非标准端口,所以我需要他们全部在端口80上。据我所知,这不能在路由器级完成,需要在Web服务器级别完成,这很好。 实质上,这只是内部路由到不同的服务器取决于子域,我希望是一个相对简单的解决scheme的常见问题。 让我知道,如果我留下任何东西。 提前致谢。 (顺便说一句,如果所有东西都相等,IIS比apache更可取)
我对nginx相当陌生,并试图设置一些非常简单的重写规则,但他们似乎并没有工作。 只是为了您的信息,这台server { .. }有它的server_name domain.com *.domain.com 。 我有这个rewrite ^ /index.php?/$request_uri; 这似乎很好。 这将匹配domain.com/asd/sad/sad,一切正常。 不过,我想做一些有趣的子域名…所以我有s1.domain.com和s198.domain.com但我想改变我的重写,所以它去/index.php?/s1/$request_uri如果这是有道理的? 所以子域在$request_uri之前。 这是我迄今为止所尝试的: if ($host ~* ^([az]+)\..*) { rewrite ^(.*)$ /index.php?/$1/$request_uri; } rewrite ^ /index.php?/$request_uri; 真的很感谢您可以给的任何帮助! 谢谢。
我正在尝试在DNS中创build一个子域名,但它似乎没有工作。 我正在获得标准 Unable to determine IP address from host name for aa.00.website.com The domain name does not exist. (以上是url,两个字母,后跟两个数字的指示)我已经通过创buildAlogging正确设置了子域,并为子域设置了IIS。 我想知道这是否允许? 如果是aa00.website.com,子域名的设置是有效的。 DNS不喜欢自己作为子域的数字吗? (编辑:aa可能代表国家代码,但不是故意的,例如'en'或'gr')
我在staging.example.com上有一个域,我想在没有HTTPS的情况下运行它来进行testing。 主域(example.com)确实使用SSL。 我试图find一个重写规则,将转发到主域的HTTPS,但不是子域名(除www。)。 目前,我已经通过删除所有可以从我的虚拟主机文件find的重写规则进行了testing,并访问了域和子域。 尽pipe为两个虚拟主机文件再次运行a2ensite并运行sudo服务apache2重新加载和sudo服务apache2重新启动,浏览器仍然被redirect到子域和主域上的HTTPS。 这个redirect可能发生在其他地方吗? 这是我的虚拟主机: <VirtualHost *:80> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com DocumentRoot /srv/www/example.com/public_html/example/example-production/current/public Options Indexes FollowSymLinks Includes ExecCGI <Directory /srv/www/example.com/public_html/example/example-production/current/public> Allow from all Options -MultiViews -Indexes </Directory> ErrorLog /srv/www/example.com/public_html/example/example-production/current/log/error.log CustomLog /srv/www/example.com/public_html/example/example-production/current/log/access.log combined <Location /> </Location> </VirtualHost> <VirtualHost *:443> ServerName example.com ServerAlias www.example.com DocumentRoot /srv/www/example.com/public_html/example/example-production/current/public ErrorLog /srv/www/example.com/public_html/example/example-production/current/log/error.log SSLEngine On SSLCertificateFile /etc/apache2/ssl/certs/example.com.crt SSLCertificateKeyFile […]