httpd.conf

Can't access files in a subdirectory using Apache server

送分小仙女□ 提交于 2019-12-07 07:30:48
问题 I have an Apache 2.2.21 server installed on my Windows 7 machine. My site is up and my scripts from /scripts subdirectory are working but when I try to load icons from /icons I get a 403 forbidden error. I've already added this to my httpd.conf file: <Directory "c:/wamp/www/icons/"> Options Indexes FollowSymLinks Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> Still no effect. So the question is: how can I access files in my /icons subfolder? P.S.: Using /images subdirectory

Wamp Apache - Allow localhost

放肆的年华 提交于 2019-12-07 05:40:32
问题 There are other questions similar to this but don't answer my problem. This is the default httpd.conf : <Directory "C:/wamp/www/"> Options Indexes FollowSymLinks AllowOverride all # onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> and it allows only 127.0.0.1 , but I want to allow also localhost and 192.168.x.x (my private ip). Well, the other answers are: put Allow from all and uncomment in hosts file the line 127.0.0.1 localhost ; but I read

Kerberos delegation between different services

只愿长相守 提交于 2019-12-06 09:03:35
问题 We have the following setup with httpd webservers as shown below: Heres the scenario: Server A takes the request from Browser does some operations and creates a new request and sends it to Server B . User X is authenticated on Server B , but User Y is not (and it is not supposed to). Since A is creating a new request, B is thinking that Y has sent the request and so denying it. Removing Server A is not an option. How do I solve this. Can you please help? 回答1: This can be solved by delegation:

apache http rewrite/redirect based on ip

主宰稳场 提交于 2019-12-06 08:19:18
问题 I want to redirect an ip to another view of my website, for example, I want the visitor from ip x to see www.xxx.com?_DEBUG=1 while all other visitors see the normal www.xxx.com, how would I do this in apache config file, what directives are used? 回答1: Here is an example of a rewrite configuration to do what you want - put this inside the virtual host for www.xxx.com on your server: RewriteCond %{REMOTE_ADDR} 1.2.3.4 RewriteCond %{QUERY_STRING} !_DEBUG=1 #RewriteRule ^/(.*)$ /$1?_DEBUG=1 [QSA

URI routing not working (multilingual)

雨燕双飞 提交于 2019-12-06 07:37:55
How are you? Summary: I'm trying to move my website from localhost to amazon-ec2 and almost any route brings "The requested URL example.com/xxx/yyy/ was not found on this server. Context: Using codeigniter structure in public_html, applications and system. Web language in the URI. Example: localhost/public_html/es/main. For testing, one page (register) it's routed differently: localhost/public_html/admin/register. The page works from localhost. Issue: I uploaded the page to my EC2, and when I try to access, almost every page shows the 404 error. Just register page works, but only if I call it

Setting up mod_proxy_html on CentOS 7

家住魔仙堡 提交于 2019-12-06 04:14:01
I'm trying to do some testing on my web server to make sure reverse proxy is working as expected before putting it on a live environment, but I am running into some problems with mod_proxy and mod_proxy_html. I have 2 virtual hosts, 1 on port 80 and 1 on port 8080. My goal is to have incoming requests for www.example.com/path/ to come in on port 80, and get reverse proxied to port 8080. Here are my virtual host settings: <VirtualHost *:8080> ServerName www.example.com:8080 DocumentRoot /var/www/html/test RewriteEngine On RewriteCond %{REQUEST_URI} !^.*test RewriteRule ^/?(.*) http://127.0.0.1

VirtualHost Same ServerName Different Directories

纵饮孤独 提交于 2019-12-06 03:43:05
I have a running production website assigned to a host (redmine application). I need to add a new application to the same host as a sub-directory. This is the current virtualhost configuration for redmine application which runs at base folder of host. <VirtualHost *:80> ServerName redmine.hostname.com DocumentRoot "C:/BitNami/redmine-2.5.1-1/apps/redmine/htdocs/public/" RewriteEngine On RewriteRule ^/(.*)$ balancer://redminecluster%{REQUEST_URI} [P,QSA] ProxyPass / balancer://redminecluster ProxyPassReverse / balancer://redminecluster <Proxy balancer://redminecluster> BalancerMember http://127

How to parse a .conf file in php

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 02:14:36
Is there any special function to parse a .conf file in php like parse_ini_file() function? If not how can I achieve that? Thanks! EDIT : Conf's like httpd.conf(Apache). (I want to read and edit httpd.conf file) No, there is no special function to parse httpd.conf, but a parser should be easy to write. For example, if you're only interested in the key-value settings, like ServerRoot /var/www , then this will do the trick: <?php define('HTTPD_CONF', '/tmp/httpd.conf'); $lines = file(HTTPD_CONF); $config = array(); foreach ($lines as $l) { preg_match("/^(?P<key>\w+)\s+(?P<value>.*)/", $l,

apache .htaccess rewrite - can I move this into httpd.conf

半世苍凉 提交于 2019-12-05 23:31:14
问题 Below is the only code I have in the .htaccess file with apache 2.2. I've read that its a performance impact to use a .htacess and better if this this can be run out of httpd.conf . Therefore is it possible for me to add this into httpd.conf ? If so where would I put it? Would it need to go into the VirtualHost for each Host that needed it (in my case a lot of hosts) or could it go generically into httpd.conf so it applies to all hosts? <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %

selective proxy port forwarding on Apache httpd

﹥>﹥吖頭↗ 提交于 2019-12-05 22:53:26
I am trying to integrate wordpress into my site which is running on Nodejs server with Apache Httpd port forwarding enabled to forward all the request from 80 port to Nodejs port 9000. I have installed wordpress into Apache httpd /www/blog folder. Now, i want to edit my httpd.conf so that all my requests coming from client should still be forwarded to nodejs server except my blog.example.com calls which should not be proxy forwarded and they should point to /www/blog folder. Is this possible ? Here is the Virtualhost code from httpd.conf :- <VirtualHost *:80> ProxyPreserveHost On ProxyPass /