Talk:Apache

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This is a Talk page - please see the documentation about using talk pages. Add newer comments below older ones, sign comments using four tildes (~~~~), and indent successive comments with colons (:). Add new sections at the bottom of the page, under a heading (== ==). Please remember to mark sections as "open for discussion" using {{talk|open}}, so they will show up in the list of open discussions.

perl & cgi

Talk status
This discussion is done as of May 3, 2017.

i know perl and cgi on other systems where its not cut out, well enough to setup webapps, not well under gentoo. could someone more knowledgeable set the perl & cgi stuff please? — The preceding unsigned comment was added by 666threesixes666 (talkcontribs) 17 October 2013

this is what i have so far. i did use cgi examples on the bugzilla wiki. i need to smooth some things out on that page and mark it requested for translation. the bugzilla shows how to assign cgi execution for arbitrary directories, and i think that is an essential function of apache that should be added..
FILE test.pl
#!/usr/bin/env perl
print "Content-Type: text/plain\n\n";
print "Hello world\n";
root #chmod a+x /var/www/localhost/cgi-bin/test.pl
and now you're a cgi pro: http://127.0.0.1/cgi-bin/test.pl 666threesixes666 (talk) 19:33, 20 December 2013 (UTC)
We each have our own interests. Unless you provide it, don't count it on coming. Closing discussion. --Maffblaster (talk) 00:16, 4 May 2017 (UTC)

site building tips

Talk status
This discussion is done as of May 3, 2017.

i think its suffice to say that with several hosting programs, we should have some sort of reference internally of site building tips.

like example.com/favicon.ico must be 16x16 & exported by [gimp] as a mswindows icon format for a website icon in firefox tabs / bookmark icon. http to https migrations. locking down websites with fail2ban / sshguard dynamic firewall programs.666threesixes666 (talk) 04:47, 7 December 2013 (UTC)

Then do it. --Maffblaster (talk) 00:17, 4 May 2017 (UTC)

blurry lines

Talk status
This discussion is done as of May 3, 2017.

these ideas / subjects should probably have gw 2 gw inter wiki links. — The preceding unsigned comment was added by 666threesixes666 (talkcontribs) 8 December 2013

Then do it. --Maffblaster (talk) 00:20, 4 May 2017 (UTC)

email

Talk status
This discussion is done as of May 3, 2017.

email will hello as localhost.localdomain if not added before local host statements. ie

/etc/hosts 10.10.12.12 www.example.com example.com 127.0.0.1 localhost localhost.localdomain

works....

still i get my emails spammed because of no ssl on my site. my forums looking pretty good though. mybb has mad powers and mad plugins. im aware of this from centos hosting problems with that, and phpmail() im still having problems with emails being sent out as apache@www.example.com & the documents here are simply lacking in these regards.

666threesixes666 (talk) 23:22, 21 December 2013 (UTC)

Not to place to discuss this. --Maffblaster (talk) 00:20, 4 May 2017 (UTC)

Enabling php support

Talk status
This discussion is done as of May 3, 2017.
Note
Before testing if the PHP module works, check that the file /etc/apache2/modules.d/70_mod_php5.conf exists and contains the following. If it doesn't exist (this may be a bug ?) create it yourself .
FILE /etc/apache2/modules.d/70_mod_php5.conf
<IfDefine PHP5> 
        # Load the module first 
        <IfModule !mod_php5.c> 
                LoadModule php5_module    modules/libphp5.so 
        </IfModule> 

        # Set it to handle the files 
        <IfModule mod_mime.c> 
                AddHandler application/x-httpd-php .php .php5 .phtml 
                AddHandler application/x-httpd-php-source .phps 
        </IfModule> 

        DirectoryIndex index.php index.phtml 
</IfDefine>

I don't know if this is due to some misconfiguration of my box. Can somebody confirm it ? For me this file doesn't exist and the "bug" can be reproduced.

Jaaf (talk) 8 March 2014

also reproducible here. it used to pull in over a year ago idk what happend, its in main page though so i suggest clearing this off of the talk page & instead hitting the bugzilla with it.666threesixes666 (talk) 19:10, 21 March 2014 (UTC)
Closing discussion. Discussions are for documentation improvements before making a proposed change. --Maffblaster (talk) 00:20, 4 May 2017 (UTC)

mod_rewrite

Talk status
This discussion is done as of May 3, 2017.

mod_rewrite is notoriously difficult to use. we need to get some tutorials up in here. php web apps dont index well in search engines with out seo urls generated by mod_rewrite. i can verify mines loaded under php info, running??? i have no method to test its functionality. all i know is it says loaded in php info, and gives me ugly php urls with out rewriting at the end. i lost my server that i had the answers on. 666threesixes666 (talk) 23:06, 29 May 2014 (UTC)

Use the forums for help. --Maffblaster (talk) 00:20, 4 May 2017 (UTC)

suexec example required

Talk status
This discussion is done as of May 3, 2017.

Havent figured out yet how suexec works so it will be useful if someone could provide an example to show how to setup a multi user apache system where every domain runs in its own user.--Cj.wijtmans (talk) 12:19, 26 January 2015 (UTC)

- build with suexec useflag
- enable -D SUEXEC
- Put the SuexecUserGroup directive in your vhost
- chmod /var/www/[vhost] to user:group

Note: if you enable suexec you have to run php with php-cgi(is this php-fcgid ?) or php wont have the correct permissions. Also you have to give +x permissions to all php files.--Cj.wijtmans (talk) 12:19, 26 January 2015 (UTC)

Nothing to discuss here. --Maffblaster (talk) 00:20, 4 May 2017 (UTC)

config example is for apache 2.2, but apache 2.4 is stable now

Talk status
This discussion is done as of May 3, 2017.

the following changes should get the file at least into a working state for more information: https://httpd.apache.org/docs/current/upgrading.html

FILE apache-2.2
Order deny,allow
Deny from all
FILE apache-2.4
Require all denied
FILE apache-2.2
Order allow,deny
Allow from all
FILE apache-2.4
Require all granted

Is there someone with a bigger know-how who can check the example config?

--StefanLangenmaier (talk) 02:18, 27 May 2016 (UTC)

No. You'll have to do research and then update this article yourself. Everyone in Gentoo has their own interests. Kind regards, --Maffblaster (talk) 00:20, 4 May 2017 (UTC)

php-fpm socket has different owner than apache which leads to access denied error

Talk status
This discussion is done as of Nov 19, 2020.

Changing the listen.owner and listen.group in php-fpm.conf from "nobody" to "apache" solves this issue, maybe it should be changed in the wiki? — The preceding unsigned comment was added by Lazysundaydreams (talkcontribs)

Isn't this already covered beneath "Next, update the php-fpm.conf file as follows:" Hansfn (talk) 07:36, 19 November 2020 (UTC)
That's the exact part where "nobody" should be changed to "apache" to get it to work, sorry if that wasn't clear enough.--Lazysundaydreams (talk) 09:46, 19 November 2020 (UTC)
Sorry, I just misunderstood you. It was clear enough. I updated the wiki which I think you could have done yourself ;-) Hansfn (talk) 11:45, 19 November 2020 (UTC)