[users@httpd] Best Wishes for 2015
I would like to thank the Apache team and all list members for their supportand hope everyone enjoys an informative and productional 2015. Keep up the good work! BR, Jos Chrispijn -- Vision is not seeing things as they are, but as they will be... - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 This webpage has a redirect loop
Your second rule is mostly abusing mod_rewrite - you should use FallbackResource instead, or just add a RewriteCond before the rule to prevent loops in the per directory context. Frank On Wed, Dec 31, 2014 at 1:45 PM, Tim Dunphy wrote: > Hey all, > > OK so I have a website that's entering a re-direct loop that prevents the > site from working. > > The site's default behavior is to go from / to site/universalpictures. And > from there it enters the redirect loop and stops working. > > Here's the vhost for the site in question: > > > DocumentRoot /var/www/qa/launchpadnew/site > ServerName launchpadnew.upqa.com > ServerAlias launchpad2.upqa.com test-launchpad.upqa.com > > Options -Indexes +FollowSymLinks -MultiViews -Includes > -ExecCGI > #Options +Indexes +FollowSymLinks +MultiViews +Includes > +ExecCGI > AllowOverride All > > Order deny,allow > Deny from all > > AuthType Basic > AuthName UPQA > AuthUserFile /var/www/qa/etc/http.passwd > AuthGroupFile /var/www/qa/launchpadnew/conf/groups > require valid-user > satisfy any > > > > > From there the site encounters an .htaccess file that has the following in > it: > > php_flag zlib.output_compression off > php_flag magic_quotes_gpc off > > AddOutputFilter INCLUDES .html > AddOutputFilter INCLUDES .htm > > AddHandler cgi-script .pl > AddHandler php5-script php > > RewriteEngine on > RewriteRule ^new$ new_site.php [QSA,L] > RewriteRule ^site/(.*)$ edit_site.php?site=$1 [QSA,L] > > The only errors I see in the logs are this one, repeating over and over > again: > > [Wed Dec 31 11:43:06.174003 2014] [:error] [pid 9053:tid 47022521411904] > [client64.210.199.232:64956] PHP Notice: Undefined index: action in > /var/www/qa/launchpadnew/site/edit_site_ajax.php on line 43, referer: > http://launchpadnew.upqa.com/site/Firstsite > > However I'm not sure if that pertains to the error I'm experiencing. > > If it's of any use, line 43 from that eror log starts at the switch > statement in the following: > > //echo "POST:".$_POST['action']; > switch ($_POST['action']) { > case 'deployFiles': > > > I'd appreciate any advice you may have in correcting this problem! > > Thanks, > Tim > > -- > GPG me!! > > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B > >
Re: [users@httpd] Virtual Hosting: One website doesn't work.
I'm not sure what you are asking. No, it doesn't work. That was the one I demonstrated in telnet. I did not get my screen filled with HTML, instead I got an error message. I actually copied the conf file from a working website and only renamed the ServerName and DocumentRoot, noting else. The directory, and all subdirectories have the same ownership. How come I can host seven different websites and have one that fails, even though their conf files differ only in the DocumentRoot and ServerName. IT seems unusual. I wouldn't think that I'm hosting too many websites, but 7 is (2^3)-1. Just kidding there, but sometimes I wonder. On January 2, 2015 at 10:32 PM, "Eric Covener" wrote: > >On Fri, Jan 2, 2015 at 7:52 PM, wrote: >> But there is one site that is does not load at all: >> >> $ telnet example.com 80 >> Trying 104.236.25.70... >> Connected to example.com. >> Escape character is '^]'. >> GET / HTTP/1.1 >> Host: www.example.com >> >> Location: http://example.com/ > >Does example.com work? Have you looked in your configuration to see >what performs this redirect from www to no-www? > >Does it fail only for the hostname of the actual system? > >--- >-- >To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Virtual Hosting: One website doesn't work.
I'm making a guess here. Are you asking whether I assign Host: as being example.com or www.example.com? Here's the script from each. They are slightly different, but the result is the same. $ telnet www.example.com 80 Trying 104.236.xxx.yyy... Connected to example.com. Escape character is '^]'. get / http/1.1 Host: www.example.com HTTP/1.0 301 Moved Permanently Date: Sat, 03 Jan 2015 17:07:37 GMT Server: Apache/2.4.10 (Ubuntu) X-Powered-By: PHP/5.5.12-2ubuntu4.1 X-Pingback: http://example.com/xmlrpc.php Location: http://example.com/ Content-Length: 0 Connection: close Content-Type: text/html; charset=UTF-8 Connection closed by foreign host. $ cat example.com.txt $ telnet www.example.com 80 Trying 104.236.xxx.yyy... Connected to example.com. Escape character is '^]'. GET / HTTP/1.1 Host: example.com HTTP/1.1 301 Moved Permanently Date: Sat, 03 Jan 2015 17:06:38 GMT Server: Apache/2.4.10 (Ubuntu) Location: http://www.example.com// Content-Length: 317 Content-Type: text/html; charset=iso-8859-1 301 Moved Permanently Moved Permanently The document has moved http://www.example.com//";>here. Apache/2.4.10 (Ubuntu) Server at example.com Port 80 Connection closed by foreign host. Notice something odd here, might be a clue. The "Location:" field is assigned with a FQDN appended with '//' which doesn't seem proper to me. I'm not sure how extra slashes are dealt with in the specification, but that's not something I typically type in when typing URL's into a web browser. On January 2, 2015 at 10:32 PM, "Eric Covener" wrote: > >On Fri, Jan 2, 2015 at 7:52 PM, wrote: >> But there is one site that is does not load at all: >> >> $ telnet example.com 80 >> Trying 104.236.xxx.yyy... >> Connected to example.com. >> Escape character is '^]'. >> GET / HTTP/1.1 >> Host: www.example.com >> >> Location: http://example.com/ > >Does example.com work? Have you looked in your configuration to see >what performs this redirect from www to no-www? > >Does it fail only for the hostname of the actual system? > >--- >-- >To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Apache 2.4 This webpage has a redirect loop
Hi Frank, Your second rule is mostly abusing mod_rewrite - you should use FallbackResource instead, or just add a RewriteCond before the rule to prevent loops in the per directory context. OK thanks for that suggestion. I'll give FallbackResource a shot! I wasn't actually the one to write these originally. They were originally done on an Apache 2.2 instance. But I have to migrate the config to Apache 2.4 I am curious about how you'd handle this as a RewriteCond tho! Apache rewrites aren't exactly my strongest area. Although I've always wanted to get better at doing them. Do you think you could provide an example of how you could handle that as a rewrite? Id' appreciate it, but no big deal if you don't have the time. Thanks, Tim On Sat, Jan 3, 2015 at 11:19 AM, Francois Gingras < francois.ging...@gmail.com> wrote: > Your second rule is mostly abusing mod_rewrite - you should use > FallbackResource instead, or just add a RewriteCond before the rule to > prevent loops in the per directory context. > > Frank > > On Wed, Dec 31, 2014 at 1:45 PM, Tim Dunphy wrote: > >> Hey all, >> >> OK so I have a website that's entering a re-direct loop that prevents >> the site from working. >> >> The site's default behavior is to go from / to site/universalpictures. >> And from there it enters the redirect loop and stops working. >> >> Here's the vhost for the site in question: >> >> >> DocumentRoot /var/www/qa/launchpadnew/site >> ServerName launchpadnew.upqa.com >> ServerAlias launchpad2.upqa.com test-launchpad.upqa.com >> >> Options -Indexes +FollowSymLinks -MultiViews -Includes >> -ExecCGI >> #Options +Indexes +FollowSymLinks +MultiViews +Includes >> +ExecCGI >> AllowOverride All >> >> Order deny,allow >> Deny from all >> >> AuthType Basic >> AuthName UPQA >> AuthUserFile /var/www/qa/etc/http.passwd >> AuthGroupFile /var/www/qa/launchpadnew/conf/groups >> require valid-user >> satisfy any >> >> >> >> >> From there the site encounters an .htaccess file that has the following >> in it: >> >> php_flag zlib.output_compression off >> php_flag magic_quotes_gpc off >> >> AddOutputFilter INCLUDES .html >> AddOutputFilter INCLUDES .htm >> >> AddHandler cgi-script .pl >> AddHandler php5-script php >> >> RewriteEngine on >> RewriteRule ^new$ new_site.php [QSA,L] >> RewriteRule ^site/(.*)$ edit_site.php?site=$1 [QSA,L] >> >> The only errors I see in the logs are this one, repeating over and over >> again: >> >> [Wed Dec 31 11:43:06.174003 2014] [:error] [pid 9053:tid 47022521411904] >> [client64.210.199.232:64956] PHP Notice: Undefined index: action in >> /var/www/qa/launchpadnew/site/edit_site_ajax.php on line 43, referer: >> http://launchpadnew.upqa.com/site/Firstsite >> >> However I'm not sure if that pertains to the error I'm experiencing. >> >> If it's of any use, line 43 from that eror log starts at the switch >> statement in the following: >> >> //echo "POST:".$_POST['action']; >> switch ($_POST['action']) { >> case 'deployFiles': >> >> >> I'd appreciate any advice you may have in correcting this problem! >> >> Thanks, >> Tim >> >> -- >> GPG me!! >> >> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B >> >> > -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
Re: [users@httpd] Virtual Hosting: One website doesn't work.
On Sat, 03 Jan 2015 12:19:38 -0500 ghalvor...@hushmail.com wrote: > I'm making a guess here. Are you asking whether I assign Host: as being > example.com or www.example.com? Here's the script from each. They are > slightly different, but the result is the same. Not actually the same ... > > $ telnet www.example.com 80 > Trying 104.236.xxx.yyy... > Connected to example.com. > Escape character is '^]'. > get / http/1.1 > Host: www.example.com > > HTTP/1.0 301 Moved Permanently > Date: Sat, 03 Jan 2015 17:07:37 GMT > Server: Apache/2.4.10 (Ubuntu) > X-Powered-By: PHP/5.5.12-2ubuntu4.1 > X-Pingback: http://example.com/xmlrpc.php > Location: http://example.com/ > Content-Length: 0 > Connection: close > Content-Type: text/html; charset=UTF-8 That redirect is issued by your PHP script. > $ telnet www.example.com 80 > Trying 104.236.xxx.yyy... > Connected to example.com. > Escape character is '^]'. > GET / HTTP/1.1 > Host: example.com > > HTTP/1.1 301 Moved Permanently > Date: Sat, 03 Jan 2015 17:06:38 GMT > Server: Apache/2.4.10 (Ubuntu) > Location: http://www.example.com// > Content-Length: 317 > Content-Type: text/html; charset=iso-8859-1 ... whereas that looks like a server redirection with a stray extra slash, and is probably generated from your apache configuration. Decide which you want to use, then configure your server and your PHP to agree on it. -- Nick Kew - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Virtual Hosting: One website doesn't work.
On January 3, 2015 at 7:36 PM, "Nick Kew" wrote: > >On Sat, 03 Jan 2015 12:19:38 -0500 >ghalvor...@hushmail.com wrote: > >> I'm making a guess here. Are you asking whether I assign Host: >as being example.com or www.example.com? Here's the script from >each. They are slightly different, but the result is the same. > >Not actually the same ... Yes, I noticed that. I noticed the difference later on in composing the message, but forgot to modify the first sentence during proofreading. > >> >> $ telnet www.example.com 80 >> Trying 104.236.xxx.yyy... >> Connected to example.com. >> Escape character is '^]'. >> get / http/1.1 >> Host: www.example.com >> >> HTTP/1.0 301 Moved Permanently >> Date: Sat, 03 Jan 2015 17:07:37 GMT >> Server: Apache/2.4.10 (Ubuntu) >> X-Powered-By: PHP/5.5.12-2ubuntu4.1 >> X-Pingback: http://example.com/xmlrpc.php >> Location: http://example.com/ >> Content-Length: 0 >> Connection: close >> Content-Type: text/html; charset=UTF-8 > >That redirect is issued by your PHP script. > >> $ telnet www.example.com 80 >> Trying 104.236.xxx.yyy... >> Connected to example.com. >> Escape character is '^]'. >> GET / HTTP/1.1 >> Host: example.com >> >> HTTP/1.1 301 Moved Permanently >> Date: Sat, 03 Jan 2015 17:06:38 GMT >> Server: Apache/2.4.10 (Ubuntu) >> Location: http://www.example.com// >> Content-Length: 317 >> Content-Type: text/html; charset=iso-8859-1 > >... whereas that looks like a server redirection >with a stray extra slash, and is probably generated >from your apache configuration. > >Decide which you want to use, then configure your server >and your PHP to agree on it. > That file, xmlprc.php is something generated by wordpress. I'm in no way familiar with how wordpress works. So this may be a wordpress configuration issue. The simplest may be to reinstall wordpress and hope it works. I'm not sure why these two behave differently (www.example.com vs example.com) I always thought the extra four letters were something that Apache knew how to deal with. It's hard to guarantee that the user will user type or omit the 'www.' What should be done about this? >-- >Nick Kew > >--- >-- >To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Virtual Hosting: One website doesn't work.
At 08:40 PM 1/3/2015 -0500, ghalvor...@hushmail.com wrote: [snip] I'm not sure why these two behave differently (www.example.com vs example.com) I always thought the extra four letters were something that Apache knew how to deal with. It's hard to guarantee that the user will user type or omit the 'www.' What should be done about this? ServerAlias ? Best -- Paul - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Virtual Hosting: One website doesn't work.
Okay, it occurred to me that I never at any point expected the file xmlprc.php to load automatically. I would have guessed something like an index.php or index.html to load instead. I reinstalled wordpress, but that seemed to make no difference. All that is in my DocumentRoot directory is a single index.html, and that doesn't even load. I'm starting to wonder if this particular domain name is somehow tainted since the other sites seem to work just fine. What I noticed that is particularly weird is that my method for testing seems to be flawed. According to my method for testing via telnet gives the same results for all my sites, whereas testing with wget on my other site returns the correct page. So the lines of "get / http/1.1", "Host: example.com" seem to be an inaccurate test. Nothing is as it seems. I really thought I understood how this webserver works... I'm totally at a loss of explanation of why it just doesn't work; this shouldn't be so hard. So I did a 'wget example.info' and I get the correct webpage. I follow the same approach via telnet on port 80, as seen below, I get totally different results. What is wrong with this test that would give a different result from wget? $ telnet example.info 80 Trying 104.236.xxx.yyy... Connected to example.info. Escape character is '^]'. get / http/1.1 host: www.example.info HTTP/1.1 501 Not Implemented Date: Sun, 04 Jan 2015 02:05:32 GMT Server: Apache/2.4.10 (Ubuntu) Allow: GET,HEAD,POST,OPTIONS Content-Length: 282 Connection: close Content-Type: text/html; charset=iso-8859-1 501 Not Implemented Not Implemented get to /index.html not supported. Apache/2.4.10 (Ubuntu) Server at www.example.info Port 80 Connection closed by foreign host. $ telnet example.info 80 Trying 104.236.xxx.yyy... Connected to example.info. Escape character is '^]'. get / http/1.1 host: example.info HTTP/1.1 301 Moved Permanently Date: Sun, 04 Jan 2015 02:06:01 GMT Server: Apache/2.4.10 (Ubuntu) Location: http://www.example.info// Content-Length: 309 Content-Type: text/html; charset=iso-8859-1 301 Moved Permanently Moved Permanently The document has moved http://www.example.info//";>here. Apache/2.4.10 (Ubuntu) Server at example.info Port 80 Connection closed by foreign host. On January 3, 2015 at 8:40 PM, ghalvor...@hushmail.com wrote: > >On January 3, 2015 at 7:36 PM, "Nick Kew" >wrote: >> >>On Sat, 03 Jan 2015 12:19:38 -0500 >>ghalvor...@hushmail.com wrote: >> >>> I'm making a guess here. Are you asking whether I assign Host: >>as being example.com or www.example.com? Here's the script from >>each. They are slightly different, but the result is the same. >> >>Not actually the same ... > >Yes, I noticed that. I noticed the difference later on in >composing the message, but forgot to modify the first sentence >during proofreading. > >> >>> >>> $ telnet www.example.com 80 >>> Trying 104.236.xxx.yyy... >>> Connected to example.com. >>> Escape character is '^]'. >>> get / http/1.1 >>> Host: www.example.com >>> >>> HTTP/1.0 301 Moved Permanently >>> Date: Sat, 03 Jan 2015 17:07:37 GMT >>> Server: Apache/2.4.10 (Ubuntu) >>> X-Powered-By: PHP/5.5.12-2ubuntu4.1 >>> X-Pingback: http://example.com/xmlrpc.php >>> Location: http://example.com/ >>> Content-Length: 0 >>> Connection: close >>> Content-Type: text/html; charset=UTF-8 >> >>That redirect is issued by your PHP script. >> >>> $ telnet www.example.com 80 >>> Trying 104.236.xxx.yyy... >>> Connected to example.com. >>> Escape character is '^]'. >>> GET / HTTP/1.1 >>> Host: example.com >>> >>> HTTP/1.1 301 Moved Permanently >>> Date: Sat, 03 Jan 2015 17:06:38 GMT >>> Server: Apache/2.4.10 (Ubuntu) >>> Location: http://www.example.com// >>> Content-Length: 317 >>> Content-Type: text/html; charset=iso-8859-1 >> >>... whereas that looks like a server redirection >>with a stray extra slash, and is probably generated >>from your apache configuration. >> >>Decide which you want to use, then configure your server >>and your PHP to agree on it. >> > >That file, xmlprc.php is something generated by wordpress. I'm in >no way familiar with how wordpress works. So this may be a >wordpress configuration issue. The simplest may be to reinstall >wordpress and hope it works. I'm not sure why these two behave >differently (www.example.com vs example.com) I always thought the >extra four letters were something that Apache knew how to deal >with. It's hard to guarantee that the user will user type or omit >the 'www.' What should be done about this? > >>-- >>Nick Kew >> >>-- >- >>-- >>To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >>For additional commands, e-mail: users-h...@httpd.apache.org > > >--- >-- >To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >For additional commands, e-mail: users-h...@httpd.apache.org -
Re: [users@httpd] Virtual Hosting: One website doesn't work.
On January 3, 2015 at 9:09 PM, "Stormy" wrote: > >At 08:40 PM 1/3/2015 -0500, ghalvor...@hushmail.com wrote: >[snip] >>I'm not sure why these two behave differently (www.example.com vs >>example.com) I always thought the extra four letters were >something that >>Apache knew how to deal with. It's hard to guarantee that the >user will >>user type or omit the 'www.' What should be done about this? > >ServerAlias ? It was undefined. I thought I would implement it according to online documentation. I retyped an equivalent excerpt from my sites-available directory. ServerName www.example.com ServerAlias example.com DocumentRoot /var/www/example.com/ht-docs/ When I perform the telnet 80 test, I get a "501 Not Implemented", but the wget command pulls the index.html correctly. I never trust a web browser when diagnosing a web page because they like to cache web files. I used telnet to simulate a web browser request, as explained in a blog, but it is apparently wrong... This is the offending article I used, by the way. http://www.the-art-of-web.com/system/telnet-http11/ > >Best -- Paul > > >--- >-- >To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org >For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org