httpd.conf

.htaccess “Options not allowed here”

吃可爱长大的小学妹 提交于 2019-11-29 16:19:07
问题 I have this in my .htaccess: Options +FollowSymLinks And I get the following error in the apache error_log: .htaccess: Options not allowed here Here's the part from my httpd.conf file: #htdocs symlinks here <Directory /Users/you/code/my/folder> Options All AllowOverride All </Directory> <Directory /> Options All AllowOverride All Order allow,deny Allow from all </Directory> <Directory "/Applications/XAMPP/xamppfiles/htdocs"> Options All AllowOverride All Order allow,deny Allow from all <

Localhost/phpmyadmin/ returns php code

送分小仙女□ 提交于 2019-11-29 15:01:19
But however after changing the "httpd.conf" directory from index.html -> index.php I got this: http://i.imgur.com/L291njR.png Then I tried using XAMPP and even after that I've gotten that screen. Could someone tell me what I might be doing wrong? Computer OS: Windows XP Full Screen dump: http://pastebin.com/Zbbxvxib Your problem is (as suggested in the comments) Apache has no idea "how" to run php, so it is just giving you the raw php files. You need to install PHP if you haven't, otherwise, if you have installed php you need to configure apache to use it. If PHP is NOT installed Go ahead and

Options FollowSymLinks or SymLinksIfOwnerMatch is off

回眸只為那壹抹淺笑 提交于 2019-11-29 11:17:39
问题 I've read almost everything possible for this issue and couldn't find anything that would solve my problem. This is erorr log I'm getting: Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/vhosts/site.com/httpdocs/cgi-bin/cron.pl When accessing site I get 403 Forbidden "You do not have permission to access this document." error. I've modified my .htaccess to have this: Options +FollowSymLinks +SymLinksIfOwnerMatch

Access Apache VirtualHost from any computer on LAN?

二次信任 提交于 2019-11-29 10:08:29
问题 I have wamp setup with quite a few websites setup as virtual hosts like this in httpd.conf <VirtualHost 127.0.0.1> ServerName project1.local DocumentRoot "c:/wamp/project1/" </VirtualHost> I have these input in the wamp machine's host file and I can access them just fine on that machine. 127.0.0.1 project1.local However, when I try to put an entry on my OSX machine as (192.168.1.101 being the internal ip of the wamp machine) it won't pull the page up. 192.168.1.101 project1.local Is there

How to test if file exists with the tag <If …> on Apache 2.4?

十年热恋 提交于 2019-11-29 07:39:54
问题 I would like to test the existence of a file in my httpd.conf of Apache 2.4. I use the tag like this : <If "%{DocumentRoot}/maintenance.enable -f"> ...code to execute ... </If> but my code is not good, apache's service doesn't want to start. I have read a lot of tutorials or docs on many sites but never found the answer :( Please help me ... 回答1: You should read Apache error log as it might provide some hint on how it is interpreted. Anyway, the right syntax is: <If "-f %{DOCUMENT_ROOT} . '

Redirection on Apache (Maintain POST params)

隐身守侯 提交于 2019-11-29 07:33:52
问题 I have Apache installed on my server and I need to redirect from http to https. The reason for this is our load balancer solution cannot hand https so requests come in on http and then we transfer them to https using the below lines in the httpd.conf file. <VirtualHost 10.1.2.91:80> Redirect 302 /GladQE/link https://glad-test.com/GladQE/link.do </VirtualHost> This works fine for GET requests but POST requests will lose the parameters passed on the URL. What would be the easiest way to perform

Apache multiple DocumentRoot

十年热恋 提交于 2019-11-29 06:14:44
问题 How can I have the following setup in apache? http://server/ABC/* should be served by /var/www/ABC/* http://server/PQR/* should be served by /var/www/PQR/* Every other request should be served by /var/www/Others/index.php (a single file). Thanks, JP 回答1: Use Alias: Alias /ABC/ /var/www/ABC/ Alias /PQR/ /var/www/PQR/ Leave the document root pointing to /var/www/Others/index.php. It could do the trick. :) 回答2: You can do this with mod_alias, which is part of the apache distribution. http:/

Giving PHP write permission in Apache

☆樱花仙子☆ 提交于 2019-11-29 04:51:16
I'm relatively new to configuring Apache. I have a PHP script that writes a JSON file based on values retrieved from $_GET . <?php file_put_contents('State.json', "{ do: '" . $_GET['do'] . "' }"); echo "Success"; ?> I run that code by create an XHR request. Ally.xhr('/Cream/Foam?do=someCommand'); The page it returns says failed to open stream: Permission denied on line 3. <Directory "~/Dropbox/Web"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from all </Directory> Those are the permissions given to the root server folder. What do I need to change to

Apache could not be started - ServerRoot must be a valid directory and Unable to find the specified module

不打扰是莪最后的温柔 提交于 2019-11-28 17:31:36
I'm using xampp portable server and I'm having some trouble with Apache http server, it says "ServerRoot must be a valid directory" Command line output: Please close this command only for Shutdown Apache 2 is starting ... httpd.exe: Syntax error on line 35 of K:/../../../xampp/apache/conf/httpd.conf: ServerRoot must be a valid directory Apache could not be started I checked the line 35 of xampp/apache/conf/httpd.conf and it was: ServerRoot "/xampp/apache" Which doesn't exist. My folders are: K:/../../../xampp/apache/conf <- where the httpd.conf is K:/../../../xampp/apache/ <- the server root K

httpd-xampp.conf: How to allow access to an external IP besides localhost?

删除回忆录丶 提交于 2019-11-28 17:04:45
I haven't found the right answer that works for me in other questions. This is how the httpd-xampp.conf looks like originally: # # New XAMPP security concept # <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> Require local ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> What should I do if I want to add another IP address besides the Require local ? For example, below Require local I have tried the following: allow from xxx.xxx.xxx.xx That is to say: # # New XAMPP security concept # <LocationMatch "^/(?i:(?:xampp|security