想知道是否有办法查看哪个虚拟主机条目用于路由请求? 有没有办法将用于请求的虚拟主机文件的名称添加到access.log文件?
有没有办法通过查询Apache服务器从服务器外部,即从另一台计算机获得Apache虚拟主机列表。
我有以下VirtualHost // filename: /etc/apache2/sites-available/ccbbbcc <VirtualHost 1.1.1.1:80> ServerAdmin [email protected] ServerName ccbbbcc.com ServerAlias www.ccbbbcc.com DocumentRoot /srv/www/ccbbbcc/production/public_html/ ErrorLog /srv/www/ccbbbcc/production/logs/error.log CustomLog /srv/www/ccbbbcc/production/logs/access.log combined </VirtualHost> 然后我也有 //filename: /etc/apache2/sites-available/default <VirtualHost 1.1.1.1:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> blah blah blah 当我input我的浏览器http://1.1.1.1时 ,它会将我带到http://ccbbbcc.com ? 即使我指向IP 1.1.1.1的新url,也可以通过http://ccbbbcc.com访问网页。 为什么我无法从/ var / www目录提供页面? 其他症状 – ccbbbcc虚拟主机只覆盖我的其他虚拟主机的一些。 不是全部。 补充笔记 我已经确定使用a2ensite并重新启动apache。 这是我的/etc/apache2/ports.conf的样子 […]
我目前正在从Apache迁移到nginx。 我有几个域将被托pipe在同一台机器上有一个IP地址。 虽然我configuration了nginx –prefix=/my/path但似乎nginx不包含我的vhostconfiguration文件。 我目前的nginx.conf如下所示: http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr – $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; # Don't show server version. server_tokens off; index index.html index.htm index.php; # Default server server { listen 81 default; server_name […]
在Centos 6.5上运行apache 2.4的时候,我已经得到了下面的虚拟主机configuration。 <VirtualHost *:4323> ServerName www.first.com ServerAlias first.com DocumentRoot /var/www/first.com DirectoryIndex index.html RewriteEngine on RewriteRule ^index\.html$ index.php$1 [L,R=301] ErrorLog /var/www/first.com/log/error.log CustomLog /var/www/first.com/log/requests.log combined </VirtualHost> 当我到server_IP:4323 ,默认的HTTP页面出现了。 我怎么能得到redirect到index.php工作? httpd.confconfiguration在这里 下面的apache细节 – Server version: Apache/2.2.15 (Unix) Server built: Mar 22 2016 19:03:53 Server's Module Magic Number: 20051115:25 Server loaded: APR 1.3.9, APR-Util 1.3.9 Compiled using: APR […]
我如何去closures每个虚拟主机的Apache默认search.htaccess文件? 我已经尝试更改默认的虚拟主机,虽然htaccess文件仍在读取。 有没有其他地方需要改变在Apache设置? 我也需要改变这也在default-ssl? <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/var/www/"> Options -Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> 更新:httpd.conf:空,下面的apache2.conf: # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration […]
我有几个虚拟主机在redhat上的相同的Apache实例下configuration: Apache的2.2.15 mod_wsgi-3.5用默认的系统python-2.6编译 对于每个虚拟主机, WSGIScriptAlias设置都指向激活虚拟环境的python文件: activate_this = '/path_to_the_virtualenv/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) 现在,我打算将其中一个项目升级到python-2.7,另一个项目是python-3.x。 我知道我可以有不同的虚拟环境,单独的python沙箱。 所以,python方面一切都很好。 问题是:是否有可能在相同的apache + mod_wsgi实例下为不同的apache虚拟主机使用不同的python版本? 如果不是,那么最好的select是什么? 有一个相关的WsgiPythonHome设置,但它是在“服务器configuration”上下文中全局定义的,而不是每个虚拟主机。 另外,mod_wsgi是为特定的python版本编译的,所以我不确定它可以处理这种情况。
在处理ESXi时,通过各种不同的RAIDconfiguration和最好的方法来回答众多答案。 我仍然有一些突出的问题。 有8个300GB 10K SAS驱动器。 这台机器将容纳5-7个虚拟机。 截至目前,这些将由1个其他服务器,2个数据库服务器,1个应用程序服务器,1个Web服务器组成。 根据研究,它似乎只是与1个逻辑RAID 10驱动器。 这对于把所有鸡蛋放在一个篮子里的古老的口头禅似乎是违反直觉的,因此我认为它是一个平淡无奇的解决scheme。 我无法使用USB驱动器托pipe操作系统(企业任务); 所以必须使用内部驱动器。 我真的不想在操作系统上浪费2个驱动器。 截至目前,我的计划是: 7x驱动器在一个单一的RAID 10设置 1个驱动器作为备用 我期待确认我的决定; 如果我不知道的东西存在,将是一个更好的路线。 编辑: 这将存在于具有HP Smart Array P410i控制器FWIW的DL380G7中。
我想启用访问我的网站没有“www”。 字首。 我试图在我的/etc/apache2/sites-available文件中插入: <VirtualHost *:80> serverName mydomain.gov.br serverAlias www.mydomain.gov.br ServerAdmin [email protected] DocumentRoot /var/www/mydomain/ … (lot's of other configs) </VirtualHost> 但是这不工作… 🙁 当我挖掘域名时,我得到不同的IP结果: www.mydomain.gov.br – 201.143.203.67 mydomain.gov.br – 201.143.203.65
我一直在寻找如何做到这一点的资源,但没有太多的运气。 我正在运行一个基于Postfix和Courier with MySQL的工作MTA / MUA作为虚拟用户的后端。 我基于我的系统在下面的文章: https://help.ubuntu.com/community/PostfixCompleteVirtualMailSystemHowto 这是很好的,直到空的部分! 我的SMTP / IMAP设置工作得很好,我设法得到SpamAssassin和ClamAV以及我在网上find的一些单独的文档。 我需要帮助的是设置Postfix使用Procmail作为mailbox_command,以便它可以与虚拟用户一起使用。 我希望能够为每个虚拟用户分别定义不同的Procmail规则。 我读过Postfix文档,据我所知,mailbox_command的默认function只适用于本地(非虚拟)用户。 提前致谢! 更新: 自从这篇文章,我已经认识到,mailbox_command不是成立的。 相反,我find了一个使用transport_maps来做到这一点的方法。 在下面阅读我自己的答案。