httpd.conf

Syntax for 301 redirect of www to non-www using httpd.conf

痞子三分冷 提交于 2019-11-28 13:28:26
How do I setup a rule (on httpd.conf) to redirect all the traffic from www.domain.com to domain.com ? Will the following work? <VirtualHost www.domain.com> Redirect 301 / http://domain.com/ </VirtualHost> Where should I put this tag in httpd.conf ? Does the order matter? This is an example of what you can use/do: <VirtualHost *:80> DocumentRoot "/var/www/domain.com" ServerName domain.com ServerAlias domain.com www.domain.com <Directory "/path/to/public_html"> allow from all Options +Indexes </Directory> Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com [NC]

Unexpected Connection Reset: A PHP or an Apache issue?

我的梦境 提交于 2019-11-28 11:13:24
I have a PHP script that keeps stopping at the same place every time and my browser reports: The connection to the server was reset while the page was loading. I have tested this on Firefox and IE, same thing happens. So, I am guessing this is an Apache/PHP config problem. Here are few things I have set. PHP.ini max_execution_time = 300000 max_input_time = 300000 memory_limit = 256M Apache (httpd.conf) Timeout 300000 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 0 Are the above correct? What can be causing this and what can I set? I am running PHP (5.2.12.12) as a module on Apache (2

Localhost/phpmyadmin/ returns php code

余生颓废 提交于 2019-11-28 09:11:26
问题 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 回答1: 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,

mod_rewrite or mod_alias?

China☆狼群 提交于 2019-11-28 07:24:39
I have a server, its httpd.conf already has some " RedirectMatch permanent " directives in it. I'm not that familiar with mod_alias, I've only ever used mod_rewrite. What's the basic difference? I don't see a "L" flag in mod_alias to stop processing rules. Which one should I use for best practices of redirecting from one sub-domain to another? Can I use both at the same time and will it be obvious which takes precedence? Chad Birch mod_alias is basically a simpler version of mod_rewrite. It can't do some things that mod_rewrite can, such as manipulate the query string. If you're able to choose

How to edit httpd.conf file in AMAZON EC2

倖福魔咒の 提交于 2019-11-28 05:21:24
I am new on AMAZON EC2 Server, recently I have Installed PHP and MySQL and now I want to update file /etc/httpd/conf/httpd.conf but the problem is, when I am going to update it, it display error like - Permission denied . What is the best way to update it? Syed Priom You have to change the file as root user. Do this: sudo nano /etc/httpd/conf/httpd.conf Make your changes and save with ctrl + O , Enter . Done. I have found solution and its working... $ sudo nano /etc/httpd/conf/httpd.conf It would be prompting you a alert, that you can duplicate it. So So duplicate it, store it on desktop with

httpd.conf and HTML5 pushstate()

落花浮王杯 提交于 2019-11-28 02:01:41
I'm running an AJAX enabled site that caters for HTML4 hash and HTML5 pushstate(). I've just migrated to an AWS EC2 instance (linux server running apache) and both site are running fine. The only issue I've experienced is when I refresh a HTML4 hash page the correct page shows. However when I refresh a HTML5 page like http://www.datingjapan.co/conversations I get the following error message: It appears that apache is trying to go into the folder 'converstations' rather then just call the site 'index.php' which then using jquery to load the correct page. Can anyone advise what might be the

How to enable Virtual Host on Xampp for Laravel?

ε祈祈猫儿з 提交于 2019-11-28 00:52:18
问题 I have XAMPP running on Windows 7 Pro. I am trying to setup a Virtual Host so that when I use "dev.app" as a domain I get directly to my public folder of laravel installation. Laravel is located at F:/xampp/htdocs/dev/public I opened the httpd-vhosts.conf file located at F:\xamp\apache\conf\extra\https-vhosts.conf and replaced everything with this # Virtual Hosts # # Required modules: mod_log_config # If you want to maintain multiple domains/hostnames on your # machine you can setup

Configure Apache .conf for Alias [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 19:05:55
So I cant get an alias working in "/etc/httpd/conf.d/vhosts.conf" which contains all of my virtual hosts: <VirtualHost *> ServerName example.com Alias /ncn /var/www/html/ncn DocumentRoot /var/www/html/mjp </VirtualHost> I want my alias to work so I can point example.com/ncn to "/var/www/html/ncn". This works if I have it in "/etc/httpd/conf/httpd.conf" but not my "/etc/httpd/conf.d/vhosts.conf" Any ideas why? Everything else seems to work i.e. ServerAlias's Cheers, Peter Sorry not sure what was going on this worked in the end: <VirtualHost *> ServerName example.com DocumentRoot /var/www/html

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

风格不统一 提交于 2019-11-27 10:30:58
问题 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:

.htaccess: RewriteEngine not allowed here

只愿长相守 提交于 2019-11-27 08:13:00
I uploaded the .htaccess to the server and received an Error 500 (Internal Server Error) . And in the error log I had the following error: .../.htaccess: RewriteEngine not allowed here But mod_rewrite.so is enabled. So, do I need to change <Directory /> Options FollowSymLinks AllowOverride None </Directory> to <Directory /> Options FollowSymLinks AllowOverride All </Directory> in the /etc/httpd/conf/httpd.conf file? Or could it be something else? The .htaccess file should be okay, because it works perfectly fine on my localhost. I just don't want to screw anything up. Here's part of my