我正在VPS上设置一个CentOS 6服务器。 我之前和Apache一起工作过,但我从来没有处理过CentOS 6。 我猜这只是对的? sudo yum install httpd -y sudo yum install mod_ssl -y (然后使用chkconfig将其设置为在启动时运行并开始configuration/etc/httpd/conf下的详细信息。) 还有更多吗? 什么特别的我应该知道进去? 任何我应该警惕的问题?
我在Joomla安装模板,然后我得到这个警报在Fedora 17。 我如何提供访问httpd来创build目录或文件。 SELinux is preventing /usr/sbin/httpd from write access on the directory templates. ***** Plugin httpd_write_content (92.2 confidence) suggests **************** If you want to allow httpd to have write access on the templates directory Then you need to change the label on 'templates' Do # semanage fcontext -a -t httpd_sys_rw_content_t 'templates' # restorecon -v […]
我已经阅读了https-vhosts.conf文件中的Apache文档,经过几个小时处理这个问题,我自己就想出了这个问题。 情况如下: 我们有一个以.ws结尾的域名 显然你不能在conf文件中这样做。 你必须使用? 通配符,否则将无法工作。 *通配符也不起作用。 此外,在ServerAlias指令中,如果ServerAlias指令中的第一个条目不正确,则超过第一个条目的任何内容都将不起作用。 这是一个不起作用的例子。 请注意,anotherdomain.com和yetanotherdomain.com将失败,因为domain.wsconfiguration不正确: <VirtualHost *:80> DocumentRoot /opt/local/apache2/sites/ourdomain ServerName www.thedomain.ws ServerAlias thedomain.ws another domain.com yetanotherdomain.com <Directory /opt/local/apache2/sites/ourdomain> allow from all </Directory> </VirtualHost> 这是我们工作条目的一个例子: <VirtualHost *:80> DocumentRoot /opt/local/apache2/sites/ourdomain ServerName www.thedomain.ws? ServerAlias thedomain.ws? another domain.com yetanotherdomain.com <Directory /opt/local/apache2/sites/ourdomain> allow from all </Directory> </VirtualHost> 如果有这方面的文件,我当然没有看到它。
我在httpd.conf中创build了以下别名: alias /aliasedfolder /some/location/on/the/server/folder <Location /aliasedfolder> AddHandler cgi-script .pl Options +FollowSymLinks +ExecCGI Order allow,deny Allow from all AllowOverride None </Location> 问题是,我可以查看“aliasedfolder”内的图像,但我得到一个“文件不存在”的错误,当我在那里运行一个perl脚本,例如/aliasedfolder/script.pl。 物理perl脚本存在于“/ some / location / on / the / server / folder”中。 我确定脚本有755许可。 以下是perl脚本的内容: #!/usr/bin/perl use CGI qw/:standard/; print "Content-type:text/html;\n\n"; print "Hello world"; 1; 什么似乎是问题?
我有很多域名托pipe在我的服务器上。 一个新的域configuration了通用configuration。 通常用户不知道和删除给apache的documentrootpath的文件夹,有时当我做了更改后重新启动Apache我得到错误,这意味着目录不存在。 是否有可能检查在Apache中为documentroot定义的文件夹的存在,然后停止并启动Apache 总之我想检查存在于httpd.conf中的所有文件夹path,然后再发出命令/etc/init.d/httpd stop。 请任何帮助
我已将HTML5 Boilerplate中的htaccess文件复制到我的httpd.conf文件中,并重新启动了Apache,但由于某些原因,gzip压缩仍然不起作用: 我已经testing过,看看这个样板代码中引用的模块是否被加载,它们似乎是,但也许是不同的名称。 我是否需要修改模块名称以便代码正常工作,或者可以将问题放在其他位置? 模块:
当我访问http://example.com/folder ,我的浏览器redirect到example.com:8080 。 但是,当我访问http://example.com/folder/时,它工作正常。 后端是一个监听端口8080的apache服务器。 nginxconfiguration: server { listen 80 default_server; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:8080; proxy_redirect default; } } 我试过了: … proxy_pass http://127.0.0.1:8080/; …. 还是一样的问题。 我已经看过类似的问题,但似乎无法得到这个答案。 有人有主意吗?
我有以下问题: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. Apache试图到达不存在的文件。 这是我的.htaccess: RewriteEngine on Options +FollowSymlinks RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ RewriteCond %{REQUEST_URI} !^/subfolder/$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /subfolder/$1 RewriteRule ^\??$ index.php [L] 我打开了日志,在日志里有这样的: […]
我有一个Xen服务器上有几台虚拟机,它坐在我局域网上的普通PC上。 虚拟机提供了访问网页的内容。 Httpd就是其中之一,所以让我们以此为例。 我想configurationiptables(或我的networking),如下所示: 允许回送 -A INPUT -i lo -j ACCEPT -A OUTPUT -o lo -j ACCEPT 允许端口80从/到WAN(networking)的入站/出站连接。 允许端口foo进/出局域网上列入白名单的计算机的stream量,同时拒绝其余的局域网。 #allow one ip with port foo -A INPUT -i eth0 -p tcp -s 192.168.0.w –dport foo -m state –state NEW,ESTABLISHED -j ACCEPT -A OUTPUT -o eth0 -p tcp –sport foo -m state –state ESTABLISHED -j ACCEPT […]
有没有办法显示一个Apache / httpd进程的列表与他们的pid和一些关于请求的信息? 像请求url,任何参数,域名,内部/外部IP地址等 我已经尝试了像netstat或htop这样的东西,但没有告诉我有关正在发生的事情的很多信息。 我想这样,我可以select一个进程来杀死,而不是重新启动服务,杀死所有的人。