Re: Config-Include anhand des Hostnamens
Moin Reindl, Gibt es irgendeine Möglichkeit in der httpd.conf anahnd des aktuellen Hostname der Maschine also nicht des Requests/Domain-Namens ein unterschiedliches Include einzubinden? if [ $HOSTNAME == rh.thelounge.net ]; then Include conf/ssl.conf-workstation else Include conf/ssl.conf-srv fi ja das geht. IfDefine[1] ist dein Freund. --- httpd.conf --- IfDefine workstation Include conf/ssl.conf-workstation /IfDefine IfDefine !workstation Include conf/ssl.conf-srv /IfDefine --- /httpd.conf --- Auf deiner workstation müßtest Du dann den apache mit httpd -Dworkstation starten. Den -D Parameter könntest Du ja in deinem shell script setzen bzw. nicht setzen. Gruß Mario [1] http://httpd.apache.org/docs/2.2/mod/core.html#ifdefine -- Apache HTTP Server Mailing List users-de unsubscribe-Anfragen an users-de-unsubscr...@httpd.apache.org sonstige Anfragen an users-de-h...@httpd.apache.org --
Re: Config-Include anhand des Hostnamens
Am 30.07.2011 11:52, schrieb Mario Brandt: ja das geht. IfDefine[1] ist dein Freund. --- httpd.conf --- IfDefine workstation Include conf/ssl.conf-workstation /IfDefine IfDefine !workstation Include conf/ssl.conf-srv /IfDefine --- /httpd.conf --- Auf deiner workstation müßtest Du dann den apache mit httpd -Dworkstation starten. Den -D Parameter könntest Du ja in deinem shell script setzen bzw. nicht setzen Perfekt, schade nur dass in /etc/sysconfig/httpd scheinbar keine Variablen akzeptiert werden weil ein $HOSTNAME steht dann im ps aux genauso drinnen - Aber Ziel erreicht /etc/httpd/conf/ kann zwischen den beiden Rechnern genauso abgeglichen werden wie Daten cat /etc/sysconfig/httpd # Configuration file for the httpd service. # To pass additional options (for instance, -D definitions) to the # httpd binary at startup, set OPTIONS here. # OPTIONS=-D workstation _ httpd.conf: # SSL-Konfiguration je nach Maschine einbinden IfDefine workstation Include conf/ssl.conf-workstation /IfDefine IfDefine srv-rhsoft Include conf/ssl.conf-srv /IfDefine signature.asc Description: OpenPGP digital signature
[users@httpd] https redirection
Hi Members suppose i have a site https://abc.com and i want if anyone write https://abc.com/xyz.com , it should redirected to https://xyz.com which is one same server. Server wide certificate installed on server . Can anyone please help in redirection -- http://linuxmantra.com
Re: [users@httpd] https redirection
I usually do redirections this way: in the web http://abc.com I insert into the body tag body onload=redix() somewhere in the javascripts for this page I have function redix() { if (window.location.search != )) window.location.replace(http://+window.location.search) } // redix suomi On 2011-07-30 08:28, vishesh kumar wrote: Hi Members suppose i have a site https://abc.com and i want if anyone write https://abc.com/xyz.com , it should redirected to https://xyz.com which is one same server. Server wide certificate installed on server . Can anyone please help in redirection -- http://linuxmantra.com - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] https redirection
On 2011-07-30 08:28, vishesh kumar wrote: Hi Members suppose i have a site https://abc.com and i want if anyone write https://abc.com/xyz.com , it should redirected to https://xyz.com which is one same server. Redirect Permanent /xyz.com/ https://xyz.com/ Server wide certificate installed on server . No. If the domains hosted on this server are not in the same parent zone (as you have just shown) you cannot use one certificate for both domains. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] https redirection
On 2011-07-30 11:08, fedora wrote: I usually do redirections this way: in the web http://abc.com I insert into the body tag body onload=redix() somewhere in the javascripts for this page I have function redix() { if (window.location.search != )) window.location.replace(http://+window.location.search) }// redix Do you understand you are replying to the apache httpd mailing list ? -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 2011-07-30 06:41, Darryle Steplight wrote: Trying adding this in your vhost, config file or .htaccess file addHandler x-httpd-php5 .php .htm .html Please get it right: FilesMatch \.php$ SetHandler application/x-httpd-php /FilesMatch On Sat, Jul 30, 2011 at 12:20 AM, Rob Stonerobst...@mira.net wrote: Hello, I have a working domain on a free LAMP hosting service. I thought it would be a *good idea* if I set up a development environment on my Debian laptop. Followed all the Debian specific stuff about setting it up and copied all my files (html, php, js, css, etc.) into the /var/www directory. I also created a new project and entered the appropriate lines into my httpd.conf file. I can access my home page but NONE of the php is executed. It all works fine on the host server. I created a three line file to call phpinfo(), That's 2 lines too many: $echo ?phpinfo()? info.php placed it into the new project's directory and it displays all of the php directives. If I make an alteration to the php.ini file and run it again you can see the change. So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. When I restart apache, this is what is entered in the error.log file. [Sat Jul 30 13:14:04 2011] [notice] caught SIGTERM, shutting down [Sat Jul 30 13:14:05 2011] [notice] Apache/2.2.17 (Debian) PHP/5.3.6-13 with Suhosin-Patch configured -- resuming normal operations Output of uname -a Linux roblaptop 2.6.39-2-686-pae #1 SMP Wed Jun 8 11:33:14 UTC 2011 i686 GNU/Linux When I run apachectl -M it shows php5_module (shared). None of this is relevant, really - the fact that a php file gets executed is also proof of all of the above. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. Ref: http://en.wikipedia.org/wiki/Server_Side_Includes - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 2011-07-30 20:06, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. No, not plain HTML. Server Side Includes execute server-side shell code, and these have to be configured on the server. It has nothing to do with HTML. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 30/07/2011 19:54, Jeroen Geilman wrote: On 2011-07-30 20:06, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. Server Side Includes execute server-side shell code, and these have to be configured on the server. Indeed so. The point in this context is where and how SSIs are accessed by the website coder, and that is from within plain HTML. The fact that they areexecuted by the server does not change this. It has nothing to do with HTML. As I said, SSIs are not part of HTML. But in reality they are associated with HTML. As it says in the 'Apache Tutorial: Introduction to Server Side Includes' at http://httpd.apache.org/docs/2.0/howto/ssi.html : SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served No, not plain HTML. Nevertheless, SSIs *are* accessed (both by the coder and by the server) from what I can rationally only describe as plain HTML. Certainly, SSIs are not themselves plain HTML but they are associated with plain HTML and are placed within plain HTML. And so, whilst it is entirely true to say that HTML does not have an include directive, it also true to say that HTML does have an include directive available to it (i.e. available to the plain HTML coder). Anyway, enough splitting hairs. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 2011-07-30 23:21, Mark Rousell wrote: On 30/07/2011 19:54, Jeroen Geilman wrote: On 2011-07-30 20:06, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. Server Side Includes execute server-side shell code, and these have to be configured on the server. Indeed so. The point in this context is where and how SSIs are accessed by the website coder, and that is from within plain HTML. The fact that they areexecuted by the server does not change this. Why do you keep insisting that SSI has anything to do with HTML ? It does not; it is a standard for executing shell code on-the-fly. It has nothing to do with HTML. As I said, SSIs are not part of HTML. But in reality they are associated with HTML. No, they're not. As it says in the 'Apache Tutorial: Introduction to Server Side Includes' at http://httpd.apache.org/docs/2.0/howto/ssi.html : That's 10 years old. SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served Nothing there about SSI being intrinsically or otherwise associated with HTML. No, not plain HTML. Nevertheless, SSIs *are* accessed (both by the coder and by the server) from what I can rationally only describe as plain HTML. Certainly, SSIs are not themselves plain HTML but they are associated with plain HTML and are placed within plain HTML. Only the last is true. And so, whilst it is entirely true to say that HTML does not have an include directive, it also true to say that HTML does have an include directive available to it (i.e. available to the plain HTML coder). No, that is plain false. If the server does not support SSI, it will not parse it and return the HTML content as-is to the client. Hence, it has NOTHING to do with HTML. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, SSI are *text* in a format that can be interpreted by an HTML client. Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. If php includes as output from the server (SSI) anything that cannot be parsed as HTML [or as HTML parsable script, js etc] by the client (browser) then it will not be render[ed ...] as desired in the browser which was the question in this thread. Servers can send anything, invalid text/html from a php script, whatever ... if the client browser cannot parse|interpret the content it is doomed to failure. Best - Paul Tired old sys-admin - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
I can't figure out why these conversations keep going on. I thought the answer was solved with Jeroen Geilman's answer. My answer was slightly off. On Sat, Jul 30, 2011 at 5:33 PM, Stormy storm...@stormy.ca wrote: At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, SSI are *text* in a format that can be interpreted by an HTML client. Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. If php includes as output from the server (SSI) anything that cannot be parsed as HTML [or as HTML parsable script, js etc] by the client (browser) then it will not be render[ed ...] as desired in the browser which was the question in this thread. Servers can send anything, invalid text/html from a php script, whatever ... if the client browser cannot parse|interpret the content it is doomed to failure. Best - Paul Tired old sys-admin - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org -- -- May the Source be with you. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 2011-07-30 23:33, Stormy wrote: At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, SSI are *text* in a format that can be interpreted by an HTML client. Incorrect. SSI stands for SERVER-Side Includes. The client, if it ever received such content, would not know what to do with it. Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. If php includes as output from the server (SSI) PHP is not SSI. anything that cannot be parsed as HTML [or as HTML parsable script, js etc] by the client (browser) then it will not be render[ed ...] as desired in the browser which was the question in this thread. Servers can send anything, invalid text/html from a php script, whatever ... if the client browser cannot parse|interpret the content it is doomed to failure. Best - Paul Tired old sys-admin I'm sorry to hear that. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
Maybe I'm ancient... but I create ALL my HTML via ECHO in PHP... then all the includes WORK! I set the entire HTML PAGE within ?php and ? brackets. ECHO works! (as does INCLUDE) - Original Message - From: Jeroen Geilman jer...@adaptr.nl To: users@httpd.apache.org Sent: Saturday, July 30, 2011 4:39 PM Subject: Re: [users@httpd] PHP files not being parsed in HTML pages On 2011-07-30 23:33, Stormy wrote: At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, SSI are *text* in a format that can be interpreted by an HTML client. Incorrect. SSI stands for SERVER-Side Includes. The client, if it ever received such content, would not know what to do with it. Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. If php includes as output from the server (SSI) PHP is not SSI. anything that cannot be parsed as HTML [or as HTML parsable script, js etc] by the client (browser) then it will not be render[ed ...] as desired in the browser which was the question in this thread. Servers can send anything, invalid text/html from a php script, whatever ... if the client browser cannot parse|interpret the content it is doomed to failure. Best - Paul Tired old sys-admin I'm sorry to hear that. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3798 - Release Date: 07/30/11 - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 31/07/11 08:11, LabTech wrote: Maybe I'm ancient... but I create ALL my HTML via ECHO in PHP... then all the includes WORK! I set the entire HTML PAGE within ?php and ? brackets. ECHO works! (as does INCLUDE) - Original Message - From: Jeroen Geilman jer...@adaptr.nl To: users@httpd.apache.org Sent: Saturday, July 30, 2011 4:39 PM Subject: Re: [users@httpd] PHP files not being parsed in HTML pages On 2011-07-30 23:33, Stormy wrote: At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, SSI are *text* in a format that can be interpreted by an HTML client. Incorrect. SSI stands for SERVER-Side Includes. The client, if it ever received such content, would not know what to do with it. Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. If php includes as output from the server (SSI) PHP is not SSI. anything that cannot be parsed as HTML [or as HTML parsable script, js etc] by the client (browser) then it will not be render[ed ...] as desired in the browser which was the question in this thread. Servers can send anything, invalid text/html from a php script, whatever ... if the client browser cannot parse|interpret the content it is doomed to failure. Best - Paul Tired old sys-admin I'm sorry to hear that. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3798 - Release Date: 07/30/11 - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org Sorry I have created such a discussion around my use of the word include. In future I'll try to be semantically correct. By include I mean lines of code like this that are embedded into the source html. ?php include xyz.php; ? All of these files echo something back so if a user did a Ctl+U they would not see that line but html tags and data. Some of my php files read a database and echo back something, even if it is only no records found. But when I access my application via localhost and do a Ctl+U, I see those lines and not html tags and data. If apache2 can process a file containing ?php phpinfo(); ? and display the contents of php.ini with colourful markup, is it using the php5 engine or doing it all by itself?? Thanks for all of your suggestions. Rob - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 2011-07-31 00:54, Rob Stone wrote: Sorry I have created such a discussion around my use of the word include. In future I'll try to be semantically correct. By include I mean lines of code like this that are embedded into the source html. ?php include xyz.php; ? And that's exactly the point - it's not including anything in the HTML file. It parses and executes the PHP code embedded in the HTML file, and that PHP code contains a command that includes *other* PHP code. Nowhere does anything get included in an HTML file. All of these files echo something back so if a user did a Ctl+U they would not see that line but html tags and data. Some of my php files read a database and echo back something, even if it is only no records found. But when I access my application via localhost and do a Ctl+U, I see those lines and not html tags and data. If apache2 can process a file containing ?php phpinfo(); ? and display the contents of php.ini with colourful markup, is it using the php5 engine or doing it all by itself?? Apache does not process these embedded commands; that is all done by PHP. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org