Difference between pages "Make.conf" and "Package:Apache"

(Difference between pages)
m (add sauce, needs much more sauce)
 
 
Line 1: Line 1:
== What is the make.conf file? What is its purpose? ==
+
{{Ebuild
Make.conf is portage's and Funtoo's main configuration file. It contains many variables that define how a package will installed in a Funtoo system. You can customize portage internal variables, such as, portage tree location, sources tarball location, overlays, to name a few. You can customize hardware specs, such as TMPFS, disk limits, GCC compilation flags to achieve best performance, etc. A great deal of this customization is done through the make.conf file. This page will attempt to explain the uses of the make.conf file, different variables that can be added to it, and their uses.  
+
|Summary=The Apache Web Server
 +
|CatPkg=www-servers/apache
 +
|Maintainer=polynomial-c@gentoo.org
 +
|Homepage=http://httpd.apache.org/
 +
}}
 +
apache is a powerful web server. apache serves html/css/cgi/pl out of the box, and other languages/frameworks via extensions.
  
== Where does this file reside? ==
+
== USE Flags ==
The <tt>make.conf</tt> file is found at <tt>/etc/portage/make.conf</tt> and <tt>/etc/make.conf</tt> though <tt>/etc/make.conf</tt> is its deprecated location.
+
TODO
  
to edit:
+
== Install ==
<console>
+
<console>###i## emerge apache</console>
###i## nano /etc/portage/make.conf
+
</console>
+
  
== Variables ==
+
== Configuration ==
 +
=== System ===
 +
Many packages have apache2 use flags, and require them to be supported by apache.  Setting a system wide apache2 use flag is a good idea.
  
* CFLAGS="-march=amdfam10 -O2 -pipe"
+
{{file|name=/etc/portage/make.conf|desc=set system wide apache2 useflag|body=
* CXXFLAGS="-march=amdfam10 -O2 -pipe"
+
USE="apache2 ..........."
* INPUT_DEVICES="evdev"
+
}}
* VIDEO_CARDS="vesa nouveau"
+
* MAKEOPTS="-j 2"
+
* USE="mmx sse"
+
* PYTHON_ABIS="2.7 3.3"
+
* PYTHON_TARGETS="2.7 3.3"
+
* RUBY_TARGETS="ruby21"
+
* ACCEPT_LICENSE="*"
+
  
[[Category:System]]
+
=== Package ===
 +
Apache's configuration files are broken up and located in several spots.
 +
*<code>/etc/conf.d/apache2</code>
 +
*<code>/etc/apache2/httpd.conf</code>
 +
*<code>/etc/apache2/modules.d/*</code>
 +
*<code>/etc/apache2/vhosts.d/*</code>
 +
 
 +
conf.d controls the init script, adding things to it such as -D SECURITY & -D PHP5 will enable web application fire-walling & the php scripting language.
 +
 
 +
httpd.conf controls how the server behaves, at the bottom of the file it has directives to include configuration files ending in .conf in /etc/apache2/modules.d & /etc/apache2/vhosts.d
 +
 
 +
== Service ==
 +
 
 +
To start apache immediately:
 +
<console>###i## rc-service apache2 start</console>
 +
 
 +
To start apache upon boot:
 +
<console>###i## rc-update add apache2</console>
 +
 
 +
== mod_rewrite ==
 +
 
 +
mod_rewrite has a reputation of being difficult to set up.  mod_rewrite requires following symlinks & Order allow,deny (apache 2.2) or Require all granted (apache 2.4) is set.  To test functionality of mod_rewrite we will need to make a few files.
 +
 
 +
{{fancynote|If you want to test this for web applications such as mediawiki adjust the path to /var/www/localhost/htdocs/mediawiki/.htaccess & so on}}
 +
 
 +
{{file|name=/var/www/localhost/htdocs/.htaccess|desc=enable the rewrite engine|body=
 +
RewriteEngine on
 +
RewriteRule ^test.html$ rewrite.html
 +
}}
 +
 
 +
{{file|name=/var/www/localhost/htdocs/test.html|desc=set system wide apache2 useflag|body=
 +
rewrite is not working
 +
}}
 +
 
 +
{{file|name=/var/www/localhost/htdocs/rewrite.html|desc=set system wide apache2 useflag|body=
 +
rewrite is working
 +
}}
 +
 
 +
Then point your browser @ http://127.0.0.1/test.html the text from rewrite.html should be loaded.
 +
 
 +
{{EbuildFooter}}

Revision as of 23:34, September 14, 2014

www-servers/apache


Current Maintainer(s):polynomial-c@gentoo.org
Source Repository:Gentoo Portage Tree
Homepage

Summary: The Apache Web Server

Use Flags

suexec
Install suexec with apache
static
Link in apache2 modules statically rather then plugins
apache2_modules_access_compat
Group authorizations based on host (name or IP address). Available as a compatibility module with previous versions.
apache2_modules_authn_core
Provides core authentication capabilities common to all authentication providers (functionality provided by authn_alias in previous versions).
apache2_modules_authz_core
Provides core authorization capabilities to various authorization/authorization modules, such as authn_file and authz_user.
apache2_modules_authz_dbd
Provides authorization capabilities via SQL database so that authenticated users can be allowed or denied access to portions of the web site by group membership.
apache2_modules_cache_disk
Disk based storage module for the HTTP caching filter (similar to mem_cache in previous versions).
apache2_modules_lbmethod_byrequests
Request counting load balancer scheduler algorithm for proxy_balancer.
apache2_modules_lbmethod_bytraffic
Weighted traffic counting load balancer scheduler algorithm for proxy_balancer.
apache2_modules_lbmethod_bybusyness
Pending request counting load balancer scheduler algorithm for proxy_balancer.
apache2_modules_lbmethod_heartbeat
Heartbeat traffic counting load balancer scheduler algorithm for proxy_balancer.
apache2_modules_slotmem_shm
Slot-based shared memory provider.
apache2_modules_socache_shmcb
A shared object cache provider using a high-performance cyclic buffer inside a shared memory segment.
apache2_modules_unixd
Basic (required) security for Unix-family platforms.
apache2_modules_proxy_fcgi
FCGI support module for mod_proxy.
apache2_modules_proxy_wstunnel
Provides support for the tunnelling of web socket connections to a backend websockets server.
apache2_modules_ratelimit
Ratelimit module for transfer rate management
apache2_modules_remoteip
Remotip module for logging

Apache

apache is a powerful web server. apache serves html/css/cgi/pl out of the box, and other languages/frameworks via extensions.

USE Flags

TODO

Install

# emerge apache

Configuration

System

Many packages have apache2 use flags, and require them to be supported by apache. Setting a system wide apache2 use flag is a good idea.

/etc/portage/make.conf: set system wide apache2 useflag
USE="apache2 ..........."

Package

Apache's configuration files are broken up and located in several spots.

  • /etc/conf.d/apache2
  • /etc/apache2/httpd.conf
  • /etc/apache2/modules.d/*
  • /etc/apache2/vhosts.d/*

conf.d controls the init script, adding things to it such as -D SECURITY & -D PHP5 will enable web application fire-walling & the php scripting language.

httpd.conf controls how the server behaves, at the bottom of the file it has directives to include configuration files ending in .conf in /etc/apache2/modules.d & /etc/apache2/vhosts.d

Service

To start apache immediately:

# rc-service apache2 start

To start apache upon boot:

# rc-update add apache2

mod_rewrite

mod_rewrite has a reputation of being difficult to set up. mod_rewrite requires following symlinks & Order allow,deny (apache 2.2) or Require all granted (apache 2.4) is set. To test functionality of mod_rewrite we will need to make a few files.

Note

If you want to test this for web applications such as mediawiki adjust the path to /var/www/localhost/htdocs/mediawiki/.htaccess & so on

/var/www/localhost/htdocs/.htaccess: enable the rewrite engine
RewriteEngine on 
RewriteRule ^test.html$ rewrite.html
/var/www/localhost/htdocs/test.html: set system wide apache2 useflag
rewrite is not working
/var/www/localhost/htdocs/rewrite.html: set system wide apache2 useflag
rewrite is working

Then point your browser @ http://127.0.0.1/test.html the text from rewrite.html should be loaded.