Articles of 虚拟主机

开发服务器的CentOS 6 Apache虚拟主机configuration帮助

我已经安装了CentOS的LAMP服务器。 它将被用作我们域中的开发服务器。 这是我们第一台Linux服务器,希望将来能够投入生产。 此服务器的DNS域名是webserv8.DOMAIN.com,并为其分配了一个内部IP地址10.64.3.55 我可以得到第一个( http://webserv8.DOMAIN.com )主机主机工作,但我不能让第二个虚拟主机( http://TESTSITE.webserv8.DOMAIN.com )工作。 这是我在我的vhost.conf文件中。 NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin joe.****@DOMAIN.com ServerName webserv8.DOMAIN.com DocumentRoot /var/www/html/ ErrorLog /var/www/error/error.log CustomLog /var/www/error/access.log combined </Virtualhost> <VirtualHost *:80> ServerAdmin joe.****@DOMAIN.com ServerName TESTSITE.webserv8.DOMAIN.com DocumentRoot /srv/www/TESTSITE/public_html/ </Virtualhost> 感谢您的帮助! 乔

更多的虚拟主机mod_mono的最佳设置是什么?

我有debian上的VPS,我想要承载至less20个运行单声道应用程序的虚拟主机。 在PHP上,我使用mpm_itk在自己的用户下运行每个虚拟主机(我对安全和空间使用控制很好)。 在这里可以运行单个应用程序的每个虚拟主机在自己的系统用户? 我知道有可能运行更多的单声道服务器,但它是资源昂贵的…

使用单独的vcl文件进行configuration虚拟托pipe

我希望使用清漆放在同一台服务器上的apache和tomcat前面。 根据所要求的IP,它将转到不同的后端。 这工作。 现在大多数网站的默认清漆逻辑将工作得很好。 但是对于一些特定的网站,我希望使用自定义的VCL代码。 我可以testing主机名称和包含特定域的configuration文件,但这只适用于单个方法recv等。 有没有办法在一个文件,每个域中包含一组完整的指令,而不必为subdomain_recv,subdomain_fetch等pipe理单独的文件? 最好不要运行单独的清漆。 当我尝试在default.vcl的“根级别”上包含文件时,出现编译错误。 最好的问候,迈克尔

包括所有子域的虚拟主机

我正在使用下面来设置我的系统需要的客户端envvariables。 SetEnvIf HOST "^(\w+).domain.com" CLIENT_ID=$1 UseCanonicalName Off VirtualDocumentRoot /home/user/clients/%-3/ 我包括在我的主域的vhost.conf,似乎是工作,但DOCUMENT_ROOT没有被设置在第3行 – 它仍然是主域doc根。 我已经尝试过和没有UseCanonicalName Off 这个configuration中缺less的是什么? 我可以加载文件根目录下的文件,但SERVER ['DOCUMENT_ROOT']总是/ usr / local / apache / htdocs 如果'clients'下的文件夹不存在,我也需要正确的configuration到404。 – 我应该注意到,我们的系统允许所有站点从一个index.php运行,这个别名在另一个虚拟主机中包含: Alias /index.php /home/public/index.php 这意味着使用上述configuration来提供内容,正确地说,只是doc根目录没有被正确设置。 – 它看起来像这个https://issues.apache.org/bugzilla/show_bug.cgi?id=26052是我的文档根源问题。 将尝试更新,并回来我的调查结果。

Apache与VirtualHosts问题

我正在生产服务器上设置一个小型网站。 虽然我们正在最后确定最终域的所有设置,但是我们已经将其设置在dev.domain.com上,以便我们的访问者在访问www.domain.com或domain.com时看不到可能有问题的网站。 我通过指定一个虚拟主机来捕获dev.domain.com与“真实”站点的文档,并创build一个新的站点与虚拟主机捕获www.domain.com和domain.com,与documentroot指向一个目录parallell到“真实”的网站,只包含一个index.html。 这个网站会显示访问者有关网站重build的消息。 这些是网站configuration文件: # dev.domain.com <VirtualHost *:80> ServerAdmin [email protected] ServerName dev.domain.com DirectoryIndex index.html DocumentRoot /var/www/www.domain.com/htdocs/ ScriptAlias /cgi-bin/ /var/www/www.domain.com/cgi-bin/ <Location /cgi-bin> Options +ExecCGI </Location> ErrorLog /var/log/apache2/www.domain.com/error.log CustomLog /var/log/apache2/www.domain.com/access.log combined </VirtualHost> # a-notice-site <VirtualHost *:80> ServerAdmin [email protected] ServerName www.domain.com ServerAlias domain.com DirectoryIndex index.html DocumentRoot /var/www/notice-site/htdocs/ ScriptAlias /cgi-bin/ /var/www/www.domain.com/cgi-bin/ <Location /cgi-bin> Options +ExecCGI </Location> ErrorLog /var/log/apache2/www.domain.com/error.log […]

别名目录中的mod_rewrite不能正常工作

我有一个wp博客,它位于/var/www/mysite.com/blog,可通过www.mysite.com/blog访问 当访问www.mysite.com/blog/我看到索引页面,但子目录上的所有链接不再工作,例如:www.mysite.com/blog/my-great-article正在抛出(apache日志): File does not exist: /var/www/mysite.com/web/blog/my-great-article, referer: http://www.mysite.com/blog/ 虚拟主机: Alias /blog "/var/www/mysite.com/web/blog" <Location "/blog"> Allow from all AddType application/x-httpd-php php php4 php3 html htm </Location> .htacess in / blog dir: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> […]

NameVirtualHost *:80没有虚拟主机

当我启动httpd它说: NameVirtualHost *:443 has no VirtualHosts NameVirtualHost *:80 has no VirtualHosts 但是我configuration了一个虚拟主机,如下所示: httpd.conf中: Listen 80 NameVirtualHost *:80 NameVirtualHost *:443 Include /etc/httpd/conf/sites-enabled/ 在启用网站的目录中有一个符号链接: 900-tennisconnect.eu.vhost -> /etc/httpd/conf/sites-available/tennisconnect.eu.vhost 错误可能是在这里(在tennisconnect.eu.vhost文件中): # Apache did not start after modifying this vhost file. # Please check file /etc/httpd/conf/sites-available/tennisconnect.eu.vhost.err for syntax errors. 它说,Apache没有启动? 但是当我做“服务httpd状态”它说服务正在运行 最后但并非最不重要的,tennisconnect.eu.vhost.err文件: <Directory /var/www/tennisconnect.eu> AllowOverride None Order Deny,Allow Deny from […]

nginx 2 symfony2 web应用程序,一个ip没有域名

我对nginx感到恼火。 我在/ usr / share / nginx / www / firstapp中设置了一个应用程序,在/ usr / share / nginx / www / secondapp中。 在我的默认configuration我安装在/根本地化我想第一个应用程序:当在浏览器中写9.9.9.9显示我的第一个应用程序,当我写9.9.9.9/makeup,没有显示我第二个应用程序。 为什么第一个应用程序显示我很好,seccondapp不能? 请帮帮我。 对不起,质量这里pasterbin代码: 在这里input链接描述 server { listen 80; server_name localhost; root /usr/share/nginx/www/firstapp/web; access_log /var/log/nginx/$host.access.log; error_log /var/log/nginx/error.log error; # strip app.php/ prefix if it is present rewrite ^/app\.php/?(.*)$ /$1 permanent; location / { root /usr/share/nginx/www/firstapp/web/; […]

并不是所有的.htaccess文件都被读取

我已经使用MAMP和Ubuntu服务器多年,但最近尝试在Mac OS X 10.7.5上使用内置的Apache服务器。 我的问题是我的一些.htaccess文件正在阅读,有些则没有。 我有2个网站,这里是他们的虚拟主机设置: <VirtualHost *:80> ServerName site1.rob DocumentRoot /Users/username/Sites/localSites/site1/public/ <Directory /> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName site2.rob DocumentRoot /Users/username/Documents/Dropbox/site2/public/ <Directory /> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> 网站1工作,因为它应该,但网站2没有。 所以我跑了一个testing。 在每个.htaccess文件中,我做了一个环境检查。 SetEnv HTACCESS on 然后,我用这个检查在根中创build了一个PHP文件。 […]

VHostsconfiguration位置

我从我的服务器中删除了Plesk,现在我正试图弄清虚拟主机是如何工作的。 当我在浏览器中打开www.domain.com时,我的etc / apache2 / apache2.conf和etc / apache2 / sites-available / default都指向/ var / www /虚拟主机/ domain.com /的httpdocs / 有些configuration文件里有一些我不知道的东西吗? 我怎样才能改变我的httpdocs的位置?