我正在寻找一个可以通过另一个网站(mainsite.com)的子域(mysite.mainsite.com)访问的网站。 我已经将我的共享主机帐户的主域名设置为mainsite.com,我即将为mysite.mainsite.com设置一个Alogging,以指向我的服务器的IP,并将mysite.mainsite.com添加为子域在cPanel中。 然而,mainsite.com永远不会指向我的服务器,所以不知何故,我觉得我是“作弊”。 我的问题很简单,如果这项工作或我错过了什么?
的httpd-vhosts.conf <Directory "/Volumes/DATA/websites"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from all Require all granted </Directory> <Virtualhost *:80> VirtualDocumentRoot "/Volumes/DATA/websites/default" ServerName default.dev UseCanonicalName Off </Virtualhost> <Virtualhost *:80> VirtualDocumentRoot "/Volumes/DATA/websites/%1/www" ServerAlias *.dev UseCanonicalName Off </Virtualhost> 请求目前处理如下: alpha.dev -> /Volumes/DATA/websites/alpha/www beta.dev -> /Volumes/DATA/websites/beta/www 有没有可能有通配符的域名和子域名? 例如: alpha.dev -> /Volumes/DATA/websites/alpha/www img.alpha.dev -> /Volumes/DATA/websites/alpha/img cdn.alpha.dev -> /Volumes/DATA/websites/alpha/cdn beta.dev […]
使用nginx和php我需要在本地主机上创build多个子域。 我怎么能做到这一点? 我使用nginx作为web服务器的ubuntu 12.04和php5 。 我已经尝试*.servername.com在我的configuration文件。 它不工作。 让我再澄清一点 说一个用户在我的网站(example.com)注册,并创build一个任何名字的微型网站,他希望(假设名称应该可用)说user1是他的名字,他想创build一个微型网站作为user1.example。 com,它应该dynamic发生。 由于一次又一次地创build虚拟主机是不实际的,请帮助
我有一个辅助域名,我需要它的子域名指向我的主域名。 例如,如果我的主域是example.com ,那么我已经使用example.org指向前者。 我希望达到的主要的所有子域也指向二级域。 我的意思是,例如,如果我有 example.com/about example.com/contact . . . 我希望他们也被指出来 example.org/about example.org/contact . . . 请让我知道如何通过mod_rewrite规则来做到这一点,我通过googlesearchfind的例子,只关注从二级域名redirect到主域名,而不提及如何redirect子域名。 PS:目前,example.org正确地被replace为example.com。 但是对于子域来说并不是这样。 我的意思是, example.org/contact不会被example.com/contact取代。 更新:我的htaccess文件包括以下内容 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
我有一个用户数据库和login表单的网站。 这个系统完美地工作了100%。 我有一个名为www.example.com的主站点和一个名为accounts.example.com的子站点。 当用户login时,他或她login主站点www.example.com/login.php 。 要查看他们的个人资料并进行编辑,他们点击一个链接,将他们带到accounts.example.com/profile.php?user=theirusername 。 当页面加载时,假设一个编辑button显示他们是否正在查看自己的帐户。 我会这样做, <?php if($user == $dbusername){ echo"<a href='edit.php'>EDIT</a>";} 如果我访问www.example.com/Accounts/profile.php?user=theirusername ,此function可以正常工作,但在子域上不起作用。 accounts.example.com指向www.example.com/Account/path。 我不知道为什么会发生这种情况,我正在使用标准的PHP SESSIONS。 当我查看Safari Inspector中的Cookies选项卡时,会显示1个SESSION, accounts.example.com 。 有没有办法将一个cookie“携带”到另一个子域? 任何帮助将是伟大的! 谢谢!
我想设置一个networkingmail. 为我的服务器上的每个域使用nginx的子域。 它似乎在https://mail.mydomain.com上工作,但我也可以通过访问不需要的服务器IP地址( https:// xxxx )来访问networking邮件。 这是我的Web邮件的conf文件: ### # Webmail (Rainloop) ### server { listen 80; server_name mail*.; return 301 https://$host$request_uri; } server { listen 443 ssl; server_name mail*.; ssl_certificate /etc/ssl/nginx/server.crt; ssl_certificate_key /etc/ssl/nginx/server.key; ssl_protocols SSLv3 TLSv1; ssl_ciphers HIGH:!aNULL:!MD5; access_log /var/log/nginx/app-webmail.access.log; error_log /var/log/nginx/app-webmail.error.log; location / { root /var/www/rainloop; index index.html index.htm index.php; location ~ [^/]\.php(/|$) { […]
我有一个VPS环境,有4个IP,其中3个指向1个或多个子域。 另一个是TLD。 由于使用主机头,子域需要被隔离在自己的IP上才能获得证书。 如果我为一个具有N个子域的IP购买了通配符证书,是否会导致以下问题: 主要的TLD拥有自己的证书 具有自己的证书的单个IP,单个子域实例
在过去,我有以下configurationLighted,这将允许我redirect我自己的一些辅助域到我的主域。 $HTTP["host"] =~ "superdomain\.net|superdomain\.eu" { url.redirect = ( "^/(.*)" => "http://mything.com/" ) } 这工作正常。 如果有人试图去superdomain.net他会被redirect到http://mything.com并保持完整的URL查询。 但是,今天我试图设置子域webmail.superdomain.net和点燃匹配webmail.superdomain.net的规则之前,并将用户redirect到http://mything.com 。 该子域的configuration是: $HTTP["host"] == "webmail.superdomain.net" { var.domain = "webmail.superdomain.net" include "/var/webconfig/config/template/domain-generic.conf" } 我把这个规则放在另一个之前,但仍然没有运气。 有没有办法可以将第一条规则更改为仅匹配域而不是子域? 谢谢。
我已经安装了LAMP堆栈,并在Google Compute Engine中将我的域名“example.com”映射到我的外部IP。 现在我需要创build一个子域,并将其映射到同一个实例中的某个文件夹。 所以,我检查了https://cloud.google.com/appengine/docs/using-custom-domains-and-ssl?hl=uk#using_subdomains这个url,但没有说出如何编辑vhosts文件。 Compute Engine VM中的apacheconfiguration文件存在于etc / apache2 /文件夹中 XAMPP中的本地configuration <VirtualHost *:8001> ServerAdmin [email protected] DocumentRoot "C:\xampp\htdocs\XYZ\public" ServerName localhost:8001 <Directory "C:\xampp\htdocs\XYZ\public"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all Require all granted </Directory> </VirtualHost> 但在etc / apache2 / lamp-server.conf中 ,configuration如下 <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html <Directory /> Options FollowSymLinks AllowOverride […]
我试图设置一个子域的服务器块,但nginx似乎没有拿起configuration(正确)。 它所做的只是拾取可用的第一个configuration块,并将其设置为适当的configuration。 我的DNSlogging如下: http : //imgur.com/oJF46eU 我的虚拟主机块如下所示: server { listen 80; server_name stage.remykooistra.nl www.stage.remykooistra.nl; root /var/www/stage.remykooistra.nl; index index.html index.php; location / { try_files $uri $uri/ /index.php?$args; } location ~ /(cronjobs|config|lib|app/code){ deny all; return 404; } location ~ \.php$ { include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } 这几乎是所有我的服务器块使用基本相同的设置,有一些例外,如SSL和其他被拒绝的文件夹等。 我希望有人能指出我在这里做错了什么,因为我很困惑,为什么它没有select正确的configuration。