Articles of 虚拟主机

雇用虚拟服务器

我正在寻找雇用虚拟服务器来托pipe我的客户的网站。 那可能吗? 我可以在虚拟服务器上托pipe尽可能多的网站吗? 有谁知道请告诉我在哪里可以find一个好价钱的虚拟服务器。

Apache虚拟主机与通配符DNSlogging

这是我目前的设置: 在httpd.conf的底部,我有以下几点: NameVirtualHost *:80 Include /etc/httpd/conf/vhosts/* 在/etc/httpd/conf/vhosts我有以下文件: mainsite.com.conf: <VirtualHost *:80> DocumentRoot "/var/www/vhosts/mainsite.com" ServerName mainsite.com ServerAlias www.mainsite.com <Directory "/var/www/vhosts/mainsite.com"> allow from all Options -Indexes </Directory> </VirtualHost> sub1.mainsite.com.conf: <VirtualHost *:80> DocumentRoot /var/www/vhosts/sub1.mainsite.com ServerName sub1.mainsite.com <Directory "/var/www/vhosts/sub1.mainsite.com"> allow from all Options -Indexes </Directory> </VirtualHost> 到现在为止还挺好! mainsite.com和www.mainsite.com共享相同的DocumentRoot (稍后我可以将所有的www.mainsite.com用户redirect到mainsite.comsearch引擎优化)。 sub1.mainsite.com也有自己的DocumentRoot ,不会干扰其他任何事情。 但是, <Anything that isn't www or sub1>.mainsite.com获得与<Anything that isn't […]

MAMP Vhosts慢

自从我开始使用MAMP的Vhosts,页面请求一直很慢。 处理页面请求需要3到5秒钟或更长时间。 我想知道是否我的hosts或vhosts文件的设置方式: 主机: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost 127.0.0.1 mysite.local www.mysite.local 127.0.0.1 anothersite.local www.anothersite.local 的httpd-vhosts.conf NameVirtualHost *:80 <VirtualHost *:80> ServerName mysite.local ServerAlias www.mysite.local DocumentRoot /Users/username/Sites/mysite.local/ […]

Dropbox为什么会在Ubuntu上导致apache2虚拟主机path的path+权限问题?

我正在试图在我的64位12.04 Ubuntu机器上创build一个开发环境,而且我正在最糟糕的时候让虚拟主机工作。 我终于明白了问题所在,但是我真的不明白。 我将我的虚拟主机的文档根目录设置在我的主目录中,即: /家庭/罗伯特/ Dropbox的/ WWW / personville 当我在浏览器中访问www.personvillepress2.com时,我得到了 禁止您无权访问/在此服务器上。 Apache / 2.2.22(Ubuntu)服务器在www.personvillepress2.com端口80 在日志中,我明白了 [星期六六月十六日09:55:25] [暴击] [客户端127.0.0.1](13)权限被拒绝:/home/robert/Dropbox/.htaccess pcfg_openfile:无法检查htaccess文件,确保它是可读的 我将文档根目录移到/ home / robert / www / personville 相应地修改虚拟主机设置,重新加载,然后突然一切正常! 这是不好的,因为我想保留我的所有来源在我的Dropbox文件夹进行备份。 我的保pipe箱文件夹的权限似乎很正常: robert@kundera-linux:~/Dropbox$ ls -al total 1036 drwx—— 29 robert robert 4096 Jun 15 09:11 . drwxr-xr-x 60 robert robert 4096 Jun 15 21:15 .. -rw-rw-r– 1 […]

请仔细检查我的SSLconfiguration。 可以吗?

我是SSL新手。 我在运行Apache 2.2.3-65的CentOS 5系统上进行设置。 它似乎工作 – 一个可以浏览我的网站和https协议显示在地址栏中。 这是我的SSL虚拟主机configuration。 它看起来好吗? 我有没有犯过重大错误? 目的是为了encryption这个特定站点的所有stream量,所以没有端口80的虚拟主机,只有这个。 <VirtualHost *:443> ServerName www.mydomain.com ServerAlias mydomain.com DocumentRoot "/opt/deployed_rails_apps/my_app/current/public" SSLEngine on SSLCertificateFile /etc/pki/tls/certs/www.mydomain.com.crt SSLCertificateKeyFile /etc/pki/tls/certs/www.mydomain.com.pem SSLCACertificateFile /etc/pki/tls/certs/www.mydomain.com.ca-bundle ErrorLog "logs/mydomain.com-ssl-error_log" CustomLog "logs/mydomain.com-ssl-access_log" common CustomLog "logs/mydomain.com-ssl-deflate_log" deflate <Directory "/opt/deployed_rails_apps/rock_pebble/current/public"> Options -MultiViews FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </Virtualhost>

如何在nginx中的不同IP上定义两台服务器?

这是问题:我有两个域指向服务器上的两个可用的IP。 说: siteone.com指向1.2.3.4,sitetwo.com指向1.2.3.5 我所做的configurationnginx虚拟主机是把 server { listen site1.com:80; # server_name site1.com www.site1.com; 在vhost1文件和 server { listen site2.com:80; # server_name site2.com www.site2.com; 在(单独的)vhost2文件上。 当然,这两个虚拟主机文件是准确复制的,期望site1和site2path。 而且vhost1自己运作良好。 但是,重新启动nginx后,我得到这个错误: 重新启动nginx:configuration文件/etc/nginx/nginx.conf语法正常[emerg]:bind()到1.2.3.5:80失败(99:不能分配请求的地址)configuration文件/etc/nginx/nginx.conftesting失败 当我把 server { listen *:80; # server_name site2.com www.site2.com; 在site2虚拟主机上,nginx重启没有错误,但不会在site2path上呈现页面。 我很困惑,并感谢您的帮助。

VirtualHost忽略ServerName和ServerAlias

我试图redirect所有stream量从.se到.com,但由于某种原因,VirtualHost忽略了我定义的ServerName和ServerAlias。 <VirtualHost *:80> ServerName www.example.se ServerAlias example.se Redirect 301 / https://www.example.com/ </VirtualHost> 在上面的例子中,即使tld不是.se,所有的stream量都会经过VirtualHostredirect 我错过了什么吗?

虚拟主机 – 定义每个单独的文件夹的子域

我目前有一个主域名:mydomain.com 这工作正常。 我试图做的是现在通过我的mydomain.conf文件添加一个子域,以便我可以: sub.mydomain.com 我已经尝试了以下 – 但是这样做的结果是即时通讯服务从mydomain.com在sub.mydomain.com的内容: # MY MAIN DOMAIN <VirtualHost *:80> ServerName mydomain.com ServerAlias *.mydomain.com DocumentRoot /var/www/mydomain.com/html </VirtualHost> # DEFINING MY SUBDOMAIN <VirtualHost *:80> ServerName sub.mydomain.com ServerAlias sub.mydomain.com DocumentRoot /var/www/sub/html/ </VirtualHost> 我自然创build了子域的DocumentRoot:DocumentRoot / var / www / sub / html / 在我的DNS供应商,我已经创build了两个:a.mydomain.com www.sub.mydomain.com Alogging – 并指出它到我的服务器IP。 (与mydomain.com指向的IP相同) 我正在运行Centos 6.2。 任何想法是什么错在这里?

参数化的Apache虚拟主机

我有这样一个虚拟主机: <VirtualHost *:80> Servername www.website.com DocumentRoot /path/to/application-1.2.1/client/app/ ErrorLog /var/log/apache2/logs/application.log </VirtualHost> application程序的名称在每次部署新版本时都会更改,例如下一个DocumentRoot将是: DocumentRoot /path/to/application-1.2.2/client/app/ 是否有可能使用通配符或类似的东西来创build虚拟主机: DocumentRoot /path/to/application-*/client/app/ 这样我就不必每次部署新版本的应用程序就改变虚拟主机了。

redirect域

我正在build立一个微型网站,我想拥有自己的url。 我怎样才能将该urlredirect到现有网站的子文件夹? 例如,我可能想redirecthttp:/www.applesandstuff.com/ => http://www.cheeseandstuff.com/applesandstuff/