我有一个运行多个网站使用虚拟主机的服务器,但我希望每个网站在不同的用户/组下运行,并想知道如果有人知道如何在Apache
我有几个虚拟主机,我想运行其中的每一个单独的用户隔离网站彼此。 我已经寻找解决scheme,但我找不到最新的解决scheme。 以独立用户的身份运行每个虚拟主机的最佳方式是什么? 我正在运行Ubuntu 11.10。
具有SuExec下的VirtualHosts的Apache HTTP Server 2.2.21 PHP 5.3.8通过fcgid Arch Linux 2011.08.19 任何时候当我尝试访问一个PHP文件时,我都会从Apache获得403访问被拒绝的错误。 HTML文件和文本文件工作正常。 我已经玩过了我能想到的PHP文件(从644到777)的所有可能的权限组合。不会改变任何东西。 我也玩FCGI包装和父文件夹的权限。 用o + x(777,775,773,771),我在浏览器中得到这个: 访问被禁止! 您无权访问请求的对象。 它是读取保护的或不可读的服务器。 …这在虚拟主机错误日志中: 客户端被服务器configuration拒绝:/ srv / www / hostname / fcgid-bin / php-fcgid-wrapper 用牛(776,774,772,770或以下),我在浏览器中得到这个: 被禁止 您无权访问此服务器上的/fcgid-bin/php-fcgid-wrapper/index.php。 此外,尝试使用ErrorDocument处理请求时遇到403禁止错误。 …这在日志中: (13)权限被拒绝:访问/fcgid-bin/php-fcgid-wrapper/index.php被拒绝 这真是令人难以置信的看到,因为我的设置工作正常,直到我开始得到这个,我不知道我可能会做什么来改变这一点。 /usr/bin/php-cgi和wrapper都可以在直接调用完全相同的input文件时正常工作。 这是我的虚拟主机configuration: <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/srv/www/hostname/public/" ServerName hostname.com ServerAlias www.hostname.com SuexecUserGroup hostname hostname ErrorLog "/srv/www/hostname/logs/error.log" LogLevel […]
我有3个网站运行一个服务器(一个IP),每个都有多个子域。 httpd.conf文件相当大,每个子域有多个VirtualHost标签。 而不是每次添加一个新的站点或新的子域时添加到httpd.conf,我想要dynamicconfiguration它。 这是布局… 该网站所在地是 /var/www/html/[ownername]/[domain]/[subdomain] 所以我想要“sub.domain.com”指向 /var/www/html/theowner/domain.com/sub 我希望this.otherdomain.org指向 /var/www/html/someowner/otherdomain.org/this 我怎么在我的httpd.conf文件中完成这个? 谢谢。
下面是我的httpd.conf文件的一个片段。 我遇到的问题是,当我访问“ https://www.subdomain2.domain.co.uk ”时,IE7中的URL栏中出现“证书错误”指示符: "The security certificate presented by this website was issued for a different website's address" 奇怪的是“ https://www.domain.co.uk ”和“ https://subdomain1.domain.co.uk ”正常工作。 <VirtualHost _default_:443> ServerName *.domain.co.uk RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.co.uk$ [NC] RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [P] RewriteCond %{HTTP_HOST} ^subdomain1.domain.co.uk$ [NC] RewriteRule ^(.*)$ http://subdomain1.domain.co.uk/$1 [P] RewriteCond %{HTTP_HOST} ^www.subdomain2.domain.co.uk$ [NC] RewriteRule ^(.*)$ http://www.subdomain2.domain.co.uk/$1 [P]
我有一个虚拟机,我用于多个项目LAMP安装。 我的文档根目录是/ www,并为其中的每个项目创build一个文件夹。 /www/project1-name/ /www/project2-name/ 我在我的浏览器中访问它们是这样的: http://dev.vm/project-name/ 我想将我的htaccess和索引文件移动到项目中的公用文件夹,以便更准确地匹配他们的生产设置。 /www/project-name/public/ …但仍然访问他们与上面相同的url。 我如何configurationApache来查找公共/文件夹作为我的每个项目的文档根? 注意:我知道我可以为每个项目创build主机和虚拟主机条目,使其拥有自己的文档根目录,但是我试图避免这种情况 – 因为我计划在远程服务器上使用类似的设置来保存子域中的多个项目称为“演示”。
说我有一个文件夹〜/ apache /包含两个网站目录:www.website1.com www.website2.com 现在,我已经使用站点映射域到目录的可用和启用站点的configuration来设置一些事情。 我想这样做,我所要做的就是创build一个新的目录,并将适当的域指向我的服务器。 我会诚实地说,我对服务器configuration一无所知。 我想我需要一些东西 VirtualDocumentRoot ~/apache/%0 在configuration文件中。 httpd.conf文件? apache2.conf? 或者最好把它放在一个单独的configuration中,并将其包含在主configuration中?
我正在尝试redirect,而没有从https://www.domain.com到https://www.domain.net的重写规则。 我有* .domain.net的通配符证书。 这会在我的error_log中产生以下警告 [警告] RSA服务器证书通配符CommonName(CN)`* .domain.net'与服务器名称不匹配! 这是有道理的,我明白为什么警告。 我想问一下是否有一种方法可以使用Redirect指令来完成上述操作而不需要警告。 这是我在ssl.conf中的虚拟主机: <VirtualHost *:443> SSLEngine on ServerName www.domain.net DocumentRoot /var/www/html/domain SSLOptions -FakeBasicAuth -ExportCertData +StrictRequire +OptRenegotiate -StdEnvVars SSLStrictSNIVHostCheck off </VirtualHost> <VirtualHost *:443> SSLEngine on ServerName www.domain.com ServerAlias www.domain.info Redirect permanent / https://www.domain.net </VirtualHost> 此外,如果有解决scheme,它可以用于从htps://domain.comredirect到htps://www.domain.com? 非常感谢!
在AWS EC2机器上,在我的/etc/httpd/conf/httpd.conf文件中,我有这个服务器configuration: NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] ServerName www.example.com DocumentRoot /var/www/html <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/html/zf2-tutorial/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> 这在处理“www.example.com”stream量方面做得很好,当我请求“www.example.com/Workstream”时,我得到了位于/var/www/html/Workstream的应用程序。 所以,感觉自己很好,我决定我想成为幻想,并有Web服务器path“ 工作stream .example.com”stream量到/var/www/html/Workstream 工作stream (遵循Apache VirtualHost文档和示例 )。 所以我得到了CNAME别名到相关的Alogging – 完成,工作,很好。 然后我把目光放在httpd.conf文件上,在现有的<VirtualHost>后面加上: <VirtualHost *:80> ServerAdmin [email protected] ServerName workstream.example.com DocumentRoot /var/www/html/Workstream <Directory /> Options […]
ProxyPass指令有什么区别: ProxyPass / http://localhost:8080/ nocanon ProxyPassReverse / http://localhost:8080/ 和一个<Proxy>指令: <Proxy http://localhost:8080/*> Order deny,allow Allow from all </Proxy> 在Apacheconfiguration文件? 我经常在同一个virtualhost部分看到这两个,我不知道有什么区别。