archive-com.com » COM » C » CAPITALSAFETY.COM

Total: 175

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

Or switch to "Titles and links view".
  • Support - Frequently Asked Questions - Apache HTTP Server
    of the error log is usr local apache2 logs error log but see the ErrorLog directive in your config files for the location on your server Check the ErrorLog again Nearly all problems can be solved by reading the error log Check the FAQ The latest version of the Apache Frequently Asked Questions list can always be found at the main Apache web site Check the Apache bug database Most problems that get reported to The Apache Group are recorded in the bug database Please check the existing reports open and closed before adding one If you find that your issue has already been reported please don t add a me too report If the original report isn t closed yet we suggest that you check it periodically You might also consider contacting the original submitter because there may be an email exchange going on about the issue that isn t getting recorded in the database Ask in a user support forum Apache has an active community of users who are willing to share their knowledge Participating in this community is usually the best and fastest way to get answers to your questions and problems Users mailing list apache on

    Original URL path: http://bc.capitalsafety.com/manual/faq/support.html (2016-02-16)
    Open archived version from archive


  • Error Messages - Frequently Asked Questions - Apache HTTP Server
    does not work properly This happens most frequently when using network or other non standard file system Symptoms of this problem include the above message in the error log and zero length responses to non zero sized files The problem generally occurs only for static files since dynamic content usually does not make use of sendfile To fix this problem simply use the EnableSendfile directive to disable sendfile for all or part of your server Also see the EnableMMAP which can help with similar problems AcceptEx Failed If you get error messages related to the AcceptEx syscall on win32 see the Win32DisableAcceptEx directive Premature end of script headers Most problems with CGI scripts result in this message written in the error log together with an Internal Server Error delivered to the browser A guide to helping debug this type of problem is available in the CGI tutorial Permission denied A Permission denied error in the error log accompanied by a Forbidden message to the client usually indicates a problem with your filesystem permissions rather than a problem in the Apache HTTP Server configuration files Check to make sure that the User and Group running the child processes has adequate permission

    Original URL path: http://bc.capitalsafety.com/manual/faq/error.html (2016-02-16)
    Open archived version from archive

  • apxs - APache eXtenSion tool - Apache HTTP Server
    generation option Use this to explicitly specify the module name For option g this is required for option i 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 libtool mode compile command Use this to add local compiler specific options Wl linker flags This option passes linker flags as additional flags to the libtool mode link 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

    Original URL path: http://bc.capitalsafety.com/manual/programs/apxs.html (2016-02-16)
    Open archived version from archive

  • Apache IP-based Virtual Host Support - Apache HTTP Server
    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 log VirtualHost

    Original URL path: http://bc.capitalsafety.com/manual/vhosts/ip-based.html (2016-02-16)
    Open archived version from archive

  • Dynamically configured mass virtual hosting - Apache HTTP Server
    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 logs so they may

    Original URL path: http://bc.capitalsafety.com/manual/vhosts/mass.html (2016-02-16)
    Open archived version from archive

  • VirtualHost Examples - Apache HTTP 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 example com DocumentRoot www domain 80 VirtualHost VirtualHost 172 20 30 40 8080 ServerName www example com DocumentRoot www domain 8080 VirtualHost VirtualHost 172 20 30 40 80 ServerName www example org DocumentRoot www otherdomain 80 VirtualHost VirtualHost 172 20 30 40 8080 ServerName www example 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 example com and www example org respectively Server configuration Listen 80 VirtualHost 172 20 30 40 DocumentRoot www example1 ServerName www example com VirtualHost VirtualHost 172 20 30 50 DocumentRoot www example2 ServerName www example 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 example com and www example 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 example com VirtualHost VirtualHost 172 20 30 40 8080 DocumentRoot www example1 8080 ServerName www example com VirtualHost VirtualHost 172 20 30 50 80 DocumentRoot www example2 80 ServerName www example org VirtualHost VirtualHost 172 20 30 50 8080 DocumentRoot www example2 8080 ServerName www example 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 example com VirtualHost VirtualHost 172 20 30 40 DocumentRoot www example2 ServerName www example org VirtualHost VirtualHost 172 20 30 40 DocumentRoot www example3 ServerName www example3 net VirtualHost IP based VirtualHost 172 20 30 50 DocumentRoot www example4 ServerName www example4 edu VirtualHost VirtualHost 172 20 30 60 DocumentRoot www example5 ServerName

    Original URL path: http://bc.capitalsafety.com/manual/vhosts/examples.html (2016-02-16)
    Open archived version from archive

  • An In-Depth Discussion of Virtual Host Matching - Apache HTTP Server
    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 tried to

    Original URL path: http://bc.capitalsafety.com/manual/vhosts/details.html (2016-02-16)
    Open archived version from archive

  • File Descriptor Limits - Apache HTTP Server
    is typically 64 and may usually be increased up 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 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 See Custom Log Formats for more about customizing your log files When you wish to

    Original URL path: http://bc.capitalsafety.com/manual/vhosts/fd-limits.html (2016-02-16)
    Open archived version from archive



  •