archive-fr.com » FR » O » OBSPM.FR

Total: 155

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • apxs - APache eXtenSion tool - Apache HTTP Server
    the apxs tool tries to determine the name from the source or as a fallback at least by guessing it from the filename Query Options q Performs a query for apxs s knowledge about certain settings The query parameters can be one or more of the following strings CC CFLAGS CFLAGS SHLIB INCLUDEDIR LD SHLIB LDFLAGS SHLIB LIBEXECDIR LIBS SHLIB SBINDIR SYSCONFDIR TARGET Use this for manually determining settings For instance use INC I apxs q INCLUDEDIR inside your own Makefiles if you need manual access to Apache s C header files Configuration Options S name value This option changes the apxs settings described above Template Generation Options g This generates a subdirectory name see option n and there two files A sample module source file named mod name c which can be used as a template for creating your own modules or as a quick start for playing with the apxs mechanism And a corresponding Makefile for even easier build and installing of this module DSO Compilation Options c This indicates the compilation operation It first compiles the C source files c of files into corresponding object files o and then builds a dynamically shared object in dsofile by linking these object files plus the remaining object files o and a of files If no o option is specified the output file is guessed from the first filename in files and thus usually defaults to mod name so o dsofile Explicitly specifies the filename of the created dynamically shared object If not specified and the name cannot be guessed from the files list the fallback name mod unknown so is used D name value This option is directly passed through to the compilation command s Use this to add your own defines to the build process I incdir This option is directly passed through to the compilation command s Use this to add your own include directories to search to the build process L libdir This option is directly passed through to the linker command Use this to add your own library directories to search to the build process l libname This option is directly passed through to the linker command Use this to add your own libraries to search to the build process Wc compiler flags This option passes compiler flags as additional flags to the compiler command Use this to add local compiler specific options Wl linker flags This option passes linker flags as additional flags to the linker command Use this to add local linker specific options DSO Installation and Configuration Options i This indicates the installation operation and installs one or more dynamically shared objects into the server s modules directory a This activates the module by automatically adding a corresponding LoadModule line to Apache s httpd conf configuration file or by enabling it if it already exists A Same as option a but the created LoadModule directive is prefixed with a hash sign i e the module is just prepared for later activation but

    Original URL path: http://ama09.obspm.fr/manual-2.0/programs/apxs.html (2015-11-16)
    Open archived version from archive


  • Custom Error Responses - Apache HTTP Server
    A 09 05 9000 712 REDIRECT PATH bin usr local bin etc REDIRECT QUERY STRING REDIRECT REMOTE ADDR 121 345 78 123 REDIRECT REMOTE HOST ooh ahhh com REDIRECT SERVER NAME crash bang edu REDIRECT SERVER PORT 80 REDIRECT SERVER SOFTWARE Apache 0 8 15 REDIRECT URL cgi bin buggy pl Note the REDIRECT prefix At least REDIRECT URL and REDIRECT QUERY STRING will be passed to the new URL assuming it s a cgi script or a cgi include The other variables will exist only if they existed prior to the error problem None of these will be set if your ErrorDocument is an external redirect anything starting with a scheme name like http even if it refers to the same host as the server Configuration Use of ErrorDocument is enabled for htaccess files when the AllowOverride is set accordingly Here are some examples ErrorDocument 500 cgi bin crash recover ErrorDocument 500 Sorry our script crashed Oh dear ErrorDocument 500 http xxx ErrorDocument 404 Lame excuses not found html ErrorDocument 401 Subscription how to subscribe html The syntax is ErrorDocument 3 digit code action where the action can be Text to be displayed Prefix the text with a quote Whatever follows the quote is displayed Note the prefix isn t displayed An external URL to redirect to A local URL to redirect to Custom Error Responses and Redirects Apache s behavior to redirected URLs has been modified so that additional environment variables are available to a script server include Old behavior Standard CGI vars were made available to a script which has been redirected to No indication of where the redirection came from was provided New behavior A new batch of environment variables will be initialized for use by a script which has been redirected to Each new variable

    Original URL path: http://ama09.obspm.fr/manual-2.0/custom-error.html (2015-11-16)
    Open archived version from archive

  • Name-based Virtual Host Support - Apache HTTP Server
    does not automatically make the server listen to that IP address See Setting which addresses and ports Apache uses for more details In addition any IP address specified here must be associated with a network interface on the server The next step is to create a VirtualHost block for each different host that you would like to serve The argument to the VirtualHost directive should be the same as the argument to the NameVirtualHost directive ie an IP address or for all addresses Inside each VirtualHost block you will need at minimum a ServerName directive to designate which host is served and a DocumentRoot directive to show where in the filesystem the content for that host lives Main host goes away If you are adding virtual hosts to an existing web server you must also create a VirtualHost block for the existing host The ServerName and DocumentRoot included in this virtual host should be the same as the global ServerName and DocumentRoot List this virtual host first in the configuration file so that it will act as the default host For example suppose that you are serving the domain www domain tld and you wish to add the virtual host www otherdomain tld which points at the same IP address Then you simply add the following to httpd conf NameVirtualHost 80 VirtualHost 80 ServerName www domain tld ServerAlias domain tld domain tld DocumentRoot www domain VirtualHost VirtualHost 80 ServerName www otherdomain tld DocumentRoot www otherdomain VirtualHost You can alternatively specify an explicit IP address in place of the in both the NameVirtualHost and VirtualHost directives For example you might want to do this in order to run some name based virtual hosts on one IP address and either IP based or another set of name based virtual hosts on another address Many servers want to be accessible by more than one name This is possible with the ServerAlias directive placed inside the VirtualHost section For example in the first VirtualHost block above the ServerAlias directive indicates that the listed names are other names which people can use to see that same web site ServerAlias domain tld domain tld then requests for all hosts in the domain tld domain will be served by the www domain tld virtual host The wildcard characters and can be used to match names Of course you can t just make up names and place them in ServerName or ServerAlias You must first have your DNS server properly configured to map those names to an IP address associated with your server Finally you can fine tune the configuration of the virtual hosts by placing other directives inside the VirtualHost containers Most directives can be placed in these containers and will then change the configuration only of the relevant virtual host To find out if a particular directive is allowed check the Context of the directive Configuration directives set in the main server context outside any VirtualHost container will be used only if they are not overridden

    Original URL path: http://ama09.obspm.fr/manual-2.0/vhosts/name-based.html (2015-11-16)
    Open archived version from archive

  • Apache IP-based Virtual Host Support - Apache HTTP Server
    when There are security partitioning issues such as company1 does not want anyone at company2 to be able to read their data except via the web In this case you would need two daemons each running with different User Group Listen and ServerRoot settings You can afford the memory and file descriptor requirements of listening to every IP alias on the machine It s only possible to Listen to the wildcard address or to specific addresses So if you have a need to listen to a specific address for whatever reason then you will need to listen to all specific addresses Although one httpd could listen to N 1 of the addresses and another could listen to the remaining address Use a single daemon when Sharing of the httpd configuration between virtual hosts is acceptable The machine services a large number of requests and so the performance loss in running separate daemons may be significant Setting up multiple daemons Create a separate httpd installation for each virtual host For each installation use the Listen directive in the configuration file to select which IP address or virtual host that daemon services e g Listen www smallco com 80 It is recommended that you use an IP address instead of a hostname see DNS caveats Setting up a single daemon with virtual hosts For this case a single httpd will service requests for the main server and all the virtual hosts The VirtualHost directive in the configuration file is used to set the values of ServerAdmin ServerName DocumentRoot ErrorLog and TransferLog or CustomLog configuration directives to different values for each virtual host e g VirtualHost www smallco com ServerAdmin webmaster mail smallco com DocumentRoot groups smallco www ServerName www smallco com ErrorLog groups smallco logs error log TransferLog groups smallco logs access

    Original URL path: http://ama09.obspm.fr/manual-2.0/vhosts/ip-based.html (2015-11-16)
    Open archived version from archive

  • Dynamically configured mass virtual hosting - Apache HTTP Server
    value Simple dynamic virtual hosts This extract from httpd conf implements the virtual host arrangement outlined in the Motivation section above but in a generic fashion using mod vhost alias get the server name from the Host header UseCanonicalName Off this log format can be split per virtual host based on the first field LogFormat V h l u t r s b vcommon CustomLog logs access log vcommon include the server name in the filenames used to satisfy requests VirtualDocumentRoot www hosts 0 docs VirtualScriptAlias www hosts 0 cgi bin This configuration can be changed into an IP based virtual hosting solution by just turning UseCanonicalName Off into UseCanonicalName DNS The server name that is inserted into the filename is then derived from the IP address of the virtual host A virtually hosted homepages system This is an adjustment of the above system tailored for an ISP s homepages server Using a slightly more complicated configuration we can select substrings of the server name to use in the filename so that e g the documents for www user isp com are found in home user It uses a single cgi bin directory instead of one per virtual host all the preliminary stuff is the same as above then include part of the server name in the filenames VirtualDocumentRoot www hosts 2 docs single cgi bin directory ScriptAlias cgi bin www std cgi There are examples of more complicated VirtualDocumentRoot settings in the mod vhost alias documentation Using more than one virtual hosting system on the same server With more complicated setups you can use Apache s normal VirtualHost directives to control the scope of the various virtual hosting configurations For example you could have one IP address for homepages customers and another for commercial customers with the following setup This can of course be combined with conventional VirtualHost configuration sections UseCanonicalName Off LogFormat V h l u t r s b vcommon Directory www commercial Options FollowSymLinks AllowOverride All Directory Directory www homepages Options FollowSymLinks AllowOverride None Directory VirtualHost 111 22 33 44 ServerName www commercial isp com CustomLog logs access log commercial vcommon VirtualDocumentRoot www commercial 0 docs VirtualScriptAlias www commercial 0 cgi bin VirtualHost VirtualHost 111 22 33 45 ServerName www homepages isp com CustomLog logs access log homepages vcommon VirtualDocumentRoot www homepages 0 docs ScriptAlias cgi bin www std cgi VirtualHost More efficient IP based virtual hosting After the first example I noted that it is easy to turn it into an IP based virtual hosting setup Unfortunately that configuration is not very efficient because it requires a DNS lookup for every request This can be avoided by laying out the filesystem according to the IP addresses themselves rather than the corresponding names and changing the logging similarly Apache will then usually not need to work out the server name and so incur a DNS lookup get the server name from the reverse DNS of the IP address UseCanonicalName DNS include the IP address in the

    Original URL path: http://ama09.obspm.fr/manual-2.0/vhosts/mass.html (2015-11-16)
    Open archived version from archive

  • VirtualHost Examples - Apache HTTP Server
    NameVirtualHost 192 168 1 1 NameVirtualHost 172 20 30 40 VirtualHost 192 168 1 1 172 20 30 40 DocumentRoot www server1 ServerName server example com ServerAlias server VirtualHost Now requests from both networks will be served from the same VirtualHost Note On the internal network one can just use the name server rather than the fully qualified host name server example com Note also that in the above example you can replace the list of IP addresses with which will cause the server to respond the same on all addresses Running different sites on different ports You have multiple domains going to the same IP and also want to serve multiple ports By defining the ports in the NameVirtualHost tag you can allow this to work If you try using VirtualHost name port without the NameVirtualHost name port or you try to use the Listen directive your configuration will not work Server configuration Listen 80 Listen 8080 NameVirtualHost 172 20 30 40 80 NameVirtualHost 172 20 30 40 8080 VirtualHost 172 20 30 40 80 ServerName www example1 com DocumentRoot www domain 80 VirtualHost VirtualHost 172 20 30 40 8080 ServerName www example1 com DocumentRoot www domain 8080 VirtualHost VirtualHost 172 20 30 40 80 ServerName www example2 org DocumentRoot www otherdomain 80 VirtualHost VirtualHost 172 20 30 40 8080 ServerName www example2 org DocumentRoot www otherdomain 8080 VirtualHost IP based virtual hosting The server has two IP addresses 172 20 30 40 and 172 20 30 50 which resolve to the names www example1 com and www example2 org respectively Server configuration Listen 80 VirtualHost 172 20 30 40 DocumentRoot www example1 ServerName www example1 com VirtualHost VirtualHost 172 20 30 50 DocumentRoot www example2 ServerName www example2 org VirtualHost Requests for any address not specified in one of the VirtualHost directives such as localhost for example will go to the main server if there is one Mixed port based and ip based virtual hosts The server machine has two IP addresses 172 20 30 40 and 172 20 30 50 which resolve to the names www example1 com and www example2 org respectively In each case we want to run hosts on ports 80 and 8080 Server configuration Listen 172 20 30 40 80 Listen 172 20 30 40 8080 Listen 172 20 30 50 80 Listen 172 20 30 50 8080 VirtualHost 172 20 30 40 80 DocumentRoot www example1 80 ServerName www example1 com VirtualHost VirtualHost 172 20 30 40 8080 DocumentRoot www example1 8080 ServerName www example1 com VirtualHost VirtualHost 172 20 30 50 80 DocumentRoot www example2 80 ServerName www example1 org VirtualHost VirtualHost 172 20 30 50 8080 DocumentRoot www example2 8080 ServerName www example2 org VirtualHost Mixed name based and IP based vhosts On some of my addresses I want to do name based virtual hosts and on others IP based hosts Server configuration Listen 80 NameVirtualHost 172 20 30 40 VirtualHost 172 20 30 40 DocumentRoot www example1 ServerName www

    Original URL path: http://ama09.obspm.fr/manual-2.0/vhosts/examples.html (2015-11-16)
    Open archived version from archive

  • An In-Depth Discussion of Virtual Host Matching - Apache HTTP Server
    defaults or a base on which to build each vhost But the positioning of these main server definitions in the config file is largely irrelevant the entire config of the main server has been parsed when this final merging occurs So even if a main server definition appears after a vhost definition it might affect the vhost definition If the main server has no ServerName at this point then the hostname of the machine that httpd is running on is used instead We will call the main server address set those IP addresses returned by a DNS lookup on the ServerName of the main server For any undefined ServerName fields a name based vhost defaults to the address given first in the VirtualHost statement defining the vhost Any vhost that includes the magic default wildcard is given the same ServerName as the main server Virtual Host Matching The server determines which vhost to use for a request as follows Hash table lookup When the connection is first made by a client the IP address to which the client connected is looked up in the internal IP hash table If the lookup fails the IP address wasn t found the request is served from the default vhost if there is such a vhost for the port to which the client sent the request If there is no matching default vhost the request is served from the main server If the IP address is not found in the hash table then the match against the port number may also result in an entry corresponding to a NameVirtualHost which is subsequently handled like other name based vhosts If the lookup succeeded a corresponding list for the IP address was found the next step is to decide if we have to deal with an IP based or a name base vhost IP based vhost If the entry we found has an empty name list then we have found an IP based vhost no further actions are performed and the request is served from that vhost Name based vhost If the entry corresponds to a name based vhost the name list contains one or more vhost structures This list contains the vhosts in the same order as the VirtualHost directives appear in the config file The first vhost on this list the first vhost in the config file with the specified IP address has the highest priority and catches any request to an unknown server name or a request without a Host header field If the client provided a Host header field the list is searched for a matching vhost and the first hit on a ServerName or ServerAlias is taken and the request is served from that vhost A Host header field can contain a port number but Apache always matches against the real port to which the client sent the request If the client submitted a HTTP 1 0 request without Host header field we don t know to what server the client

    Original URL path: http://ama09.obspm.fr/manual-2.0/vhosts/details.html (2015-11-16)
    Open archived version from archive

  • File Descriptor Limits - Apache HTTP Server
    to a large hard limit Although Apache attempts to increase the limit as required this may not work if Your system does not provide the setrlimit system call The setrlimit RLIMIT NOFILE call does not function on your system such as Solaris 2 3 The number of file descriptors required exceeds the hard limit Your system imposes other limits on file descriptors such as a limit on stdio streams only using file descriptors below 256 Solaris 2 In the event of problems you can Reduce the number of log files don t specify log files in the VirtualHost sections but only log to the main log files See Splitting up your log files below for more information on doing this If you system falls into 1 or 2 above then increase the file descriptor limit before starting Apache using a script like bin sh ulimit S n 100 exec httpd Please see the Descriptors and Apache document containing further details about file descriptor problems and how they can be solved on your operating system Splitting up your log files If you want to log multiple virtual hosts to the same log file you may want to split up the log files afterwards in order to run statistical analysis of the various virtual hosts This can be accomplished in the following manner First you will need to add the virtual host information to the log entries This can be done using the LogFormat directive and the v variable Add this to the beginning of your log format string LogFormat v h l u t r s b vhost CustomLog logs multiple vhost log vhost This will create a log file in the common log format but with the canonical virtual host whatever appears in the ServerName directive prepended to each line

    Original URL path: http://ama09.obspm.fr/manual-2.0/vhosts/fd-limits.html (2015-11-16)
    Open archived version from archive



  •