Articles of apache 2.2

使用Apache虚拟主机configurationAWS

我有Route 53configuration转发 client1.mydomain.com ALIAS -> eb.crypticaddress.com. 这按预期工作。 现在我已经在Elastic Beanstalk中重写了Apache Config。 在EB实例中,我有一个运行的NodeJS提供了一个API,但也将静态网站内容作为静态HTML和JQuery提供。 app.js app.use(express.static(path.join(__dirname, 'website'))); 静态文件夹 网站/客户端1网站/客户端2网站/客户端3 我怎么把这个连接起来 client1.mydomain.com被转发到website/client1文件夹等等? 我已经在项目的.ebextensions文件夹中有了这个nginx.config文件。 我在.ebextensions文件夹中使用这个: files: "/etc/httpd/conf.d/vhost.conf": mode: "000644" owner: root group: root encoding: plain content: | NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/var/app/current/website" <Directory "/var/app/current/website"> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> </VirtualHost> <VirtualHost *:80> ServerName client1.mydomain.com […]

使用Open Directory简单身份validation的macOS服务器反向代理

我有一个公共领域。 假设它是apps.domain.com。 例如,我反向代理每个应用程序到不同的path / app1 – > http:// localhost:3000 / app1 / app2 – > http:// localhost:3001 / app2 等等…我所做的是,在MacOS服务器应用程序,定义可以访问该域的用户组。 问题是,如果我访问根( http://apps.domain.com )我要求authentication; 但如果我访问资源,如app1或app2我没有要求进行身份validation。 任何想法如何做到这一点? 在OS X 10.12.4上运行macOS Server 5.3。

用bash设置一个可以在.htaccess中读取的variables

我需要用一个.htaccess文件中的apache可以读取的bash脚本来设置一个variables。 bash脚本经常被cron调用。 当我做 var=value export var 我尝试调用.htaccess与$var它不会工作。 那么,我能做些什么呢?

apache2将httpredirect到httpsstream浪箱中

我试图实现apache2 httpredirect到httpsstream浪。 下面是我的Vagrantfile和bootstrap.sh脚本。 在无家可归的情况下,我无法弄清楚我在这里做错了什么。 我正在使用Ubuntu 16.04stream浪汉形象。 VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/xenial64" config.vm.hostname = "suffire" config.vm.network :forwarded_port, guest: 80, host: 8080, protocol: "tcp" config.vm.network :forwarded_port, guest: 443, host: 8443, protocol: "tcp" config.vm.network :private_network, ip: "10.0.1.10" config.vm.provision :shell, path: "bootstrap.sh" end Bootstrap脚本如下。 #!/usr/bin/env bash # ————————————— # Virtual Machine Setup # ————————————— # […]

我的Apacheconfiguration永远不会提供资产,但总是重写到我的集群

所以我有一个代理三个rails过程前面的apache。 相当标准,而且工作,但最近我意识到,铁路仍在服务的资产。 为了解决这个问题,我阻止了我的rails进程提供资源(这是一个configuration),然后设置修复我的Apacheconfiguration。 唉,徒然。 我目前的VirtualHostconfiguration如下所示: NameVirtualHost *:8081 <VirtualHost *:8081> ServerName pipeguardian.com DocumentRoot "D:/pipeguardian/ruby/Sabic/public" <Directory "D:/pipeguardian/ruby/Sabic/public" > Options Indexes FollowSymLinks MultiViews AllowOverride All Order deny,allow allow from all </Directory> <Proxy *> Order deny,allow Allow from all </Proxy> <Proxy balancer://thin_cluster> BalancerMember http://127.0.0.1:4000 BalancerMember http://127.0.0.1:4001 BalancerMember http://127.0.0.1:4002 </Proxy> ProxyPass / Balancer://thin_cluster/ ProxyPassReverse / balancer://thin_cluster/ #ProxyReserveHost on RewriteEngine On […]

为什么我的index.html总是被caching,如果请求没有结尾的斜杠

在我的var / www /中,我有一个index.html,并在configuration文件中添加了以下指令: <Directory "/var/www/"> DirectoryIndex index.html Options Indexes FollowSymLinks </Directory> 在网页浏览器中,如果我使用 example.com 那么返回的文档总是被caching,但是 example.com/ 没有被caching。 即使在浏览器中,他们都可以访问example.com/。 这里发生了什么?

前端是否有可能导致服务器响应速度慢的问题?

我们的Wordpress网站目前的服务器响应时间非常慢, 它通常在10-12秒内返回。 网站上的其他所有内容都进行了优化,直到最近它才返回了98的Google网页速度洞察分数。 这听起来像主机给我的问题(特别是直到最近运行良好)。 还有什么可能吗?

Apache SSI不能与替代命令一起使用

我在我的httpd.conf中有一个虚拟主机,充当反向代理。 它工作正常,我能够取代文字与我想要的,但我想包括一个文件.. ServerName example.cm ServerAlias www.example.cm Options +FollowSymLinks Options +Includes RequestHeader unset Accept-Encoding RewriteEngine on RewriteRule ^example w [L] FilterDeclare CUSTOMFILTER FilterProvider CUSTOMFILTER SUBSTITUTE resp=Content-Type $* FilterProvider CUSTOMFILTER SUBSTITUTE resp=Content-Type $/html FilterDeclare Sub FilterProvider Sub SUBSTITUTE resp=Content-Type $text/html FilterDeclare SSI FilterProvider SSI INCLUDES resp=Content-Type $text/html <Location /> ProxyPass http://www.example.com/ ProxyPassReverse http://www.example.com/ AddOutputFilterByType SUBSTITUTE text/html Substitute […]

防止nginxreplace%2B

我正在从Apache转换到Nginx。 自从Nginxreplace为%2B后,我遇到了问题。 我的nginx.conf: location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/sockets/php.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_read_timeout 7200; } 当我使用Apache时, $_SERVER["QUERY_STRING"] : 'nome_portfolio=+cart2+cart45&id=0&operacao=listar&id_filtrado=0&portfolio_editavel=' 使用Nginx: 'nome_portfolio=%2Bcart2%2Bcart45&id=0&operacao=listar&id_filtrado=0&portfolio_editavel='

phplist不断redirect到login页面

我一直遇到安装phplist的麻烦。 我以前使用过这个软件,但是这是一个在centos 7机器上的新安装。 添加一个安装数据库驻留并将正确的文件放在适当的位置后,我导航到设置页面,点击链接初始化数据库会发送一个消息,指出我的会话令牌是无效的。 然后我回到初始化数据库链接的设置页面。 将链接复制/粘贴到地址栏中,但在访问该页面之前删除该标记。 数据库设置,我设置我的用户名和密码等安装完成后我login。然后,当我点击pipe理面板中的任何链接,我redirect到login页面。 我可以重新login,但同样的情况一遍又一遍地发生。 数据库设置完成后,在login后删除URL中的标记无助。 我检查了错误日志,并没有显示在那里。 我正在运行centos 7,使用apache的php 5.6。