Page 1 of 3 123 Last
  • Jump to page:
    #1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171

    Multiple httpd.con on Macbook


    Hi; I have 2 questions I appreciate some info.

    1 - This might sound naive but I ask anyways: Does Mac Book need a server to be able to work as a computer? Let me put it this way: Does Mac Book (or other computers) come with server software on them? Something like Apache? Or server is only related to "web" and "browser"?

    2 - Why do I have multiple httpdf.conf file on my Mac Book? Are these for different purposes? Are they both necessary or this is a bad installation or a miss-configuration (or something like that)? These 2 files have different content as you can see below.

    /Applications/XAMPP/etc/httpd.conf

    Code:
    #
    # This is the main Apache HTTP server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
    # In particular, see 
    # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
    # for a discussion of each configuration directive.
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do.  They're here only as hints or reminders.  If you are unsure
    # consult the online docs. You have been warned.  
    #
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path.  If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
    # with ServerRoot set to "/Applications/xampp/xamppfiles" will be interpreted by the
    # server as "/Applications/xampp/xamppfiles/logs/foo.log".
    
    #
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    #
    # Do not add a slash at the end of the directory path.  If you point
    # ServerRoot at a non-local disk, be sure to point the LockFile directive
    # at a local disk.  If you wish to share the same ServerRoot for multiple
    # httpd daemons, you will need to change at least LockFile and PidFile.
    #
    ServerRoot "/Applications/XAMPP/xamppfiles"
    
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses.
    #
    #Listen 12.34.56.78:80
    Listen 80
    
    #
    # Dynamic Shared Object (DSO) Support
    #
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    #
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    #
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authn_dbm_module modules/mod_authn_dbm.so
    
    #DELETED SOME OF THEM SINCE THE POST GOT TOO BIG#
    
    LoadModule rewrite_module modules/mod_rewrite.so
    #LoadModule apreq_module modules/mod_apreq2.so
    LoadModule ssl_module modules/mod_ssl.so
    
    <IfDefine JUSTTOMAKEAPXSHAPPY>
    LoadModule php4_module        modules/libphp4.so
    LoadModule php5_module        modules/libphp5.so
    </IfDefine>
    
    <IfModule !mpm_winnt_module>
    <IfModule !mpm_netware_module>
    #
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.  
    #
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    #
    User nobody
    Group nogroup
    </IfModule>
    </IfModule>
    
    # 'Main' server configuration
    #
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition.  These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    #
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    #
    
    #
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed.  This address appears on some server-generated pages, such
    # as error documents.  e.g. admin@your-domain.com
    #
    ServerAdmin you@example.com
    
    #
    # ServerName gives the name and port that the server uses to identify itself.
    # This can often be determined automatically, but we recommend you specify
    # it explicitly to prevent problems during startup.
    #
    # If your host doesn't have a registered DNS name, enter its IP address here.
    #
    #ServerName www.example.com:80
    # XAMPP
    ServerName localhost
    
    #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
    
    #
    # Each directory to which Apache has access can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories). 
    #
    # First, we configure the "default" to be a very restrictive set of 
    # features.  
    #
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        #XAMPP
        #Order deny,allow
        #Deny from all
    </Directory>
    
    #
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    #
    
    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "/Applications/XAMPP/xamppfiles/htdocs">
        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs/2.2/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks ExecCGI Includes
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride All
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>
    
    #
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    <IfModule dir_module>
        DirectoryIndex index.html index.php index.htmls index.htm
    </IfModule>
    
    #
    # The following lines prevent .htaccess and .htpasswd files from being 
    # viewed by Web clients. 
    #
    <FilesMatch "^\.ht">
        Order allow,deny
        Deny from all
    </FilesMatch>
    
    #
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here.  If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    #
    ErrorLog logs/error_log
    
    #
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    #
    LogLevel warn
    
    <IfModule log_config_module>
        #
        # The following directives define some format nicknames for use with
        # a CustomLog directive (see below).
        #
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
    
        <IfModule logio_module>
          # You need to enable mod_logio.c to use %I and %O
          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        </IfModule>
    
        #
        # The location and format of the access logfile (Common Logfile Format).
        # If you do not define any access logfiles within a <VirtualHost>
        # container, they will be logged here.  Contrariwise, if you *do*
        # define per-<VirtualHost> access logfiles, transactions will be
        # logged therein and *not* in this file.
        #
        CustomLog logs/access_log common
    
        #
        # If you prefer a logfile with access, agent, and referer information
        # (Combined Logfile Format) you can use the following directive.
        #
        #CustomLog logs/access_log combined
    </IfModule>
    
    <IfModule alias_module>
        #
        # Redirect: Allows you to tell clients about documents that used to 
        # exist in your server's namespace, but do not anymore. The client 
        # will make a new request for the document at its new location.
        # Example:
        # Redirect permanent /foo http://www.example.com/bar
    
        #
        # Alias: Maps web paths into filesystem paths and is used to
        # access content that does not live under the DocumentRoot.
        # Example:
        # Alias /webpath /full/filesystem/path
        #
        # If you include a trailing / on /webpath then the server will
        # require it to be present in the URL.  You will also likely
        # need to provide a <Directory> section to allow access to
        # the filesystem path.
    
        #
        # ScriptAlias: This controls which directories contain server scripts. 
        # ScriptAliases are essentially the same as Aliases, except that
        # documents in the target directory are treated as applications and
        # run by the server when requested rather than as documents sent to the
        # client.  The same rules about trailing "/" apply to ScriptAlias
        # directives as to Alias.
        #
        ScriptAlias /cgi-bin/ "/Applications/XAMPP/xamppfiles/cgi-bin/"
    
    </IfModule>
    
    <IfModule cgid_module>
        #
        # ScriptSock: On threaded servers, designate the path to the UNIX
        # socket used to communicate with the CGI daemon of mod_cgid.
        #
        #Scriptsock logs/cgisock
    </IfModule>
    
    #
    # "/Applications/xampp/xamppfiles/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "/Applications/XAMPP/xamppfiles/phpmyadmin">
        AllowOverride None
        Options None 
        Order allow,deny
        Allow from all
    </Directory>
    
    #
    # DefaultType: the default MIME type the server will use for a document
    # if it cannot otherwise determine one, such as from filename extensions.
    # If your server contains mostly text or HTML documents, "text/plain" is
    # a good value.  If most of your content is binary, such as applications
    # or images, you may want to use "application/octet-stream" instead to
    # keep browsers from trying to display binary files as though they are
    # text.
    #
    DefaultType text/plain
    
    <IfModule mime_module>
        #
        # TypesConfig points to the file containing the list of mappings from
        # filename extension to MIME-type.
        #
        TypesConfig etc/mime.types
    
        #
        # AddType allows you to add to or override the MIME configuration
        # file specified in TypesConfig for specific file types.
        #
        #AddType application/x-gzip .tgz
        #
        # AddEncoding allows you to have certain browsers uncompress
        # information on the fly. Note: Not all browsers support this.
        #
        #AddEncoding x-compress .Z
        #AddEncoding x-gzip .gz .tgz
        #
        # If the AddEncoding directives above are commented-out, then you
        # probably should define those extensions to indicate media types:
        #
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
    
        #
        # AddHandler allows you to map certain file extensions to "handlers":
        # actions unrelated to filetype. These can be either built into the server
        # or added with the Action directive (see below)
        #
        # To use CGI scripts outside of ScriptAliased directories:
        # (You will also need to add "ExecCGI" to the "Options" directive.)
        #
        #AddHandler cgi-script .cgi
        AddHandler cgi-script .cgi .pl
    
        # For files that include their own HTTP headers:
        #AddHandler send-as-is asis
    
        # For server-parsed imagemap files:
        #AddHandler imap-file map
    
        # For type maps (negotiated resources):
        #AddHandler type-map var
    
        #
        # Filters allow you to process content before it is sent to the client.
        #
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        #
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
    </IfModule>
    
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    #MIMEMagicFile etc/magic
    
    #
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    #
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    #
    
    #
    # EnableMMAP and EnableSendfile: On systems that support it, 
    # memory-mapping or the sendfile syscall is used to deliver
    # files.  This usually improves server performance, but must
    # be turned off when serving from networked-mounted 
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    #
    EnableMMAP off
    EnableSendfile off
    
    # Supplemental configuration
    #
    # The configuration files in the /Applications/xampp/etc/extra/ directory can be 
    # included to add extra features or to modify the default configuration of 
    # the server, or you may simply copy their contents here and change as 
    # necessary.
    
    # Server-pool management (MPM specific)
    #Include /Applications/XAMPP/etc/extra/httpd-mpm.conf
    
    # Multi-language error messages
    Include /Applications/XAMPP/etc/extra/httpd-multilang-errordoc.conf
    
    # Fancy directory listings
    #Include /Applications/XAMPP/etc/extra/httpd-autoindex.conf
    
    # Language settings
    #Include /Applications/XAMPP/etc/extra/httpd-languages.conf
    
    # User home directories
    Include /Applications/XAMPP/etc/extra/httpd-userdir.conf
    
    # Real-time info on requests and configuration
    #Include /Applications/XAMPP/etc/extra/httpd-info.conf
    
    # Virtual hosts
    #Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
    
    # Local access to the Apache HTTP Server Manual
    #Include /Applications/XAMPP/etc/extra/httpd-manual.conf
    
    # Distributed authoring and versioning (WebDAV)
    #Include /Applications/XAMPP/etc/extra/httpd-dav.conf
    
    # Various default settings
    #Include /Applications/XAMPP/etc/extra/httpd-default.conf
    
    # Secure (SSL/TLS) connections
    #Include /Applications/XAMPP/etc/extra/httpd-ssl.conf
    
    <IfModule ssl_module>
        <IfDefine SSL>
            Include etc/extra/httpd-ssl.conf
        </IfDefine>
    </IfModule>
    
    
    #
    # Note: The following must must be present to support
    #       starting without SSL on platforms with no /dev/random equivalent
    #       but a statically compiled-in mod_ssl.
    #
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    
    #XAMPP
    Include etc/extra/httpd-xampp.conf
    
    bash-3.2# pwd
    /Applications/XAMPP/etc

    And this one is in /private/etc/apache2

    Code:
    #
    # This is the main Apache HTTP server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
    # In particular, see 
    # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
    # for a discussion of each configuration directive.
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do.  They're here only as hints or reminders.  If you are unsure
    # consult the online docs. You have been warned.  
    #
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path.  If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so "/private/var/log/apache2/foo_log"
    # with ServerRoot set to "/usr" will be interpreted by the
    # server as "/usr//private/var/log/apache2/foo_log".
    
    #
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    #
    # Do not add a slash at the end of the directory path.  If you point
    # ServerRoot at a non-local disk, be sure to point the LockFile directive
    # at a local disk.  If you wish to share the same ServerRoot for multiple
    # httpd daemons, you will need to change at least LockFile and PidFile.
    #
    ServerRoot "/usr"
    
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses.
    #
    #Listen 12.34.56.78:80
    Listen 80
    
    #
    # Dynamic Shared Object (DSO) Support
    #
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available _before_ they are used.
    # Statically compiled modules (those listed by `httpd -l') do not need
    # to be loaded here.
    #
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    #
    LoadModule authn_file_module libexec/apache2/mod_authn_file.so
    LoadModule authn_dbm_module libexec/apache2/mod_authn_dbm.so
    LoadModule authn_anon_module libexec/apache2/mod_authn_anon.so
    #DELETED SOME OF THEM SINCE THE POST GOT TOO BIG##LoadModule php5_module        libexec/apache2/libphp5.so
    #LoadModule fastcgi_module     libexec/apache2/mod_fastcgi.so
    
    <IfModule !mpm_netware_module>
    <IfModule !mpm_winnt_module>
    #
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.  
    #
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    #
    User _www
    Group _www
    
    </IfModule>
    </IfModule>
    
    # 'Main' server configuration
    #
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition.  These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    #
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    #
    
    #
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed.  This address appears on some server-generated pages, such
    # as error documents.  e.g. admin@your-domain.com
    #
    ServerAdmin you@example.com
    
    #
    # ServerName gives the name and port that the server uses to identify itself.
    # This can often be determined automatically, but we recommend you specify
    # it explicitly to prevent problems during startup.
    #
    # If your host doesn't have a registered DNS name, enter its IP address here.
    #
    #ServerName www.example.com:80
    
    #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "/Library/WebServer/Documents"
    
    #
    # Each directory to which Apache has access can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories). 
    #
    # First, we configure the "default" to be a very restrictive set of 
    # features.  
    #
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>
    
    #
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    #
    
    #
    # This should be changed to whatever you set DocumentRoot to.
    #
    <Directory "/Library/WebServer/Documents">
        #
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        #
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        #
        # The Options directive is both complicated and important.  Please see
        # http://httpd.apache.org/docs/2.2/mod/core.html#options
        # for more information.
        #
        Options Indexes FollowSymLinks MultiViews
    
        #
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        #
        AllowOverride None
    
        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all
    
    </Directory>
    
    #
    # DirectoryIndex: sets the file that Apache will serve if a directory
    # is requested.
    #
    <IfModule dir_module>
        DirectoryIndex index.html
    </IfModule>
    
    #
    # The following lines prevent .htaccess and .htpasswd files from being 
    # viewed by Web clients. 
    #
    <FilesMatch "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
        Order allow,deny
        Deny from all
        Satisfy All
    </FilesMatch>
    
    #
    # Apple specific filesystem protection.
    #
    <Files "rsrc">
        Order allow,deny
        Deny from all
        Satisfy All
    </Files>
    <DirectoryMatch ".*\.\.namedfork">
        Order allow,deny
        Deny from all
        Satisfy All
    </DirectoryMatch>
    
    
    ErrorLog "/private/var/log/apache2/error_log"
    
    #
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    #
    LogLevel warn
    
    <IfModule log_config_module>
        #
        # The following directives define some format nicknames for use with
        # a CustomLog directive (see below).
        #
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
        LogFormat "%h %l %u %t \"%r\" %>s %b" common
    
        <IfModule logio_module>
          # You need to enable mod_logio.c to use %I and %O
          LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        </IfModule>
    
        
        CustomLog "/private/var/log/apache2/access_log" common
    
        #
        # If you prefer a logfile with access, agent, and referer information
        # (Combined Logfile Format) you can use the following directive.
        #
        #CustomLog "/private/var/log/apache2/access_log" combined
    </IfModule>
    
    <IfModule alias_module>
        #
        # Redirect: Allows you to tell clients about documents that used to 
        # exist in your server's namespace, but do not anymore. The client 
        # will make a new request for the document at its new location.
        # Example:
        # Redirect permanent /foo http://www.example.com/bar
    
        #
        # Alias: Maps web paths into filesystem paths and is used to
        # access content that does not live under the DocumentRoot.
        # Example:
        # Alias /webpath /full/filesystem/path
        #
        # If you include a trailing / on /webpath then the server will
        # require it to be present in the URL.  You will also likely
        # need to provide a <Directory> section to allow access to
        # the filesystem path.
    
        #
        # ScriptAlias: This controls which directories contain server scripts. 
        # ScriptAliases are essentially the same as Aliases, except that
        # documents in the target directory are treated as applications and
        # run by the server when requested rather than as documents sent to the
        # client.  The same rules about trailing "/" apply to ScriptAlias
        # directives as to Alias.
        #
        ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1"
    
    </IfModule>
    
    <IfModule cgid_module>
        #
        # ScriptSock: On threaded servers, designate the path to the UNIX
        # socket used to communicate with the CGI daemon of mod_cgid.
        #
        #Scriptsock /private/var/run/cgisock
    </IfModule>
    
    #
    # "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "/Library/WebServer/CGI-Executables">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>
    
    #
    # DefaultType: the default MIME type the server will use for a document
    # if it cannot otherwise determine one, such as from filename extensions.
    # If your server contains mostly text or HTML documents, "text/plain" is
    # a good value.  If most of your content is binary, such as applications
    # or images, you may want to use "application/octet-stream" instead to
    # keep browsers from trying to display binary files as though they are
    # text.
    #
    DefaultType text/plain
    
    <IfModule mime_module>
        #
        # TypesConfig points to the file containing the list of mappings from
        # filename extension to MIME-type.
        #
        TypesConfig /private/etc/apache2/mime.types
    
        #
        # AddType allows you to add to or override the MIME configuration
        # file specified in TypesConfig for specific file types.
        #
        #AddType application/x-gzip .tgz
        #
        # AddEncoding allows you to have certain browsers uncompress
        # information on the fly. Note: Not all browsers support this.
        #
        #AddEncoding x-compress .Z
        #AddEncoding x-gzip .gz .tgz
        #
        # If the AddEncoding directives above are commented-out, then you
        # probably should define those extensions to indicate media types:
        #
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
    
        #
        # AddHandler allows you to map certain file extensions to "handlers":
        # actions unrelated to filetype. These can be either built into the server
        # or added with the Action directive (see below)
        #
        # To use CGI scripts outside of ScriptAliased directories:
        # (You will also need to add "ExecCGI" to the "Options" directive.)
        #
        #AddHandler cgi-script .cgi
    
        # For type maps (negotiated resources):
        #AddHandler type-map var
    
        #
        # Filters allow you to process content before it is sent to the client.
        #
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        #
        #AddType text/html .shtml
        #AddOutputFilter INCLUDES .shtml
    </IfModule>
    
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    #MIMEMagicFile /private/etc/apache2/magic
    
    #
    # Customizable error responses come in three flavors:
    # 1) plain text 2) local redirects 3) external redirects
    #
    # Some examples:
    #ErrorDocument 500 "The server made a boo boo."
    #ErrorDocument 404 /missing.html
    #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    #ErrorDocument 402 http://www.example.com/subscription_info.html
    #
    
    #
    # EnableMMAP and EnableSendfile: On systems that support it, 
    # memory-mapping or the sendfile syscall is used to deliver
    # files.  This usually improves server performance, but must
    # be turned off when serving from networked-mounted 
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    #
    #EnableMMAP off
    #EnableSendfile off
    
    # 6894961
    TraceEnable off
    
    # Supplemental configuration
    #
    # The configuration files in the /private/etc/apache2/extra/ directory can be 
    # included to add extra features or to modify the default configuration of 
    # the server, or you may simply copy their contents here and change as 
    # necessary.
    
    # Server-pool management (MPM specific)
    Include /private/etc/apache2/extra/httpd-mpm.conf
    
    # Multi-language error messages
    #Include /private/etc/apache2/extra/httpd-multilang-errordoc.conf
    
    # Fancy directory listings
    Include /private/etc/apache2/extra/httpd-autoindex.conf
    
    # Language settings
    Include /private/etc/apache2/extra/httpd-languages.conf
    
    # User home directories
    Include /private/etc/apache2/extra/httpd-userdir.conf
    
    # Real-time info on requests and configuration
    #Include /private/etc/apache2/extra/httpd-info.conf
    
    # Virtual hosts
    Include /private/etc/apache2/extra/httpd-vhosts.conf
    
    # Local access to the Apache HTTP Server Manual
    Include /private/etc/apache2/extra/httpd-manual.conf
    
    # Distributed authoring and versioning (WebDAV)
    #Include /private/etc/apache2/extra/httpd-dav.conf
    
    # Various default settings
    #Include /private/etc/apache2/extra/httpd-default.conf
    
    # Secure (SSL/TLS) connections
    #Include /private/etc/apache2/extra/httpd-ssl.conf
    #
    # Note: The following must must be present to support
    #       starting without SSL on platforms with no /dev/random equivalent
    #       but a statically compiled-in mod_ssl.
    #
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>
    
    Include /private/etc/apache2/other/*.conf

    Once I have this cleared I can continue.

    Thank you
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    1. Apache is a "WEB" server..and , no, a computer does not, usually, need a WEB SERVER installed to have it function as a computer.

    2. macosx has its own Apache web server installed by default, used for "Web Sharing"...and therefore, it has its own httpd.conf file for it.

    You are using XAMPP, which has Apache as part of it, and therefore, will have its own httpd.conf (or apache2.conf).
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    Originally Posted by DonR
    1. Apache is a "WEB" server..and , no, a computer does not, usually, need a WEB SERVER installed to have it function as a computer.

    2. macosx has its own Apache web server installed by default, used for "Web Sharing"...and therefore, it has its own httpd.conf file for it.

    You are using XAMPP, which has Apache as part of it, and therefore, will have its own httpd.conf (or apache2.conf).
    Ah! Thank you. I am trying to set up virtual host I am getting partial success. It is a bit mixed up because of this

    When I restart server, which one gets restarted?

    and when I go to http://localhost I see XAMPP server. But as I said, it could get a bit messy.

    Would you please give me some guide on how to seperate these functionalities so it gets more clear?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    since you are using Xampp, that is the only Apache conf you need to worry about or even mess with [as long as you never enabled the "web sharing" feature in MacOSX].

    Does the MAC version of xampp have the xampp control center/panel where you can easily start/stop/restart apache, mysql?

    what issues are you still having with setting up your VirtualHosts?
  8. #5
  9. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    Hi;


    1 -
    Originally Posted by DonR
    What issues are you still having with setting up your VirtualHosts?
    Well I totally messed it up. I now cannot start Apache XAMPP
    Another webserver is already running!

    XAMPP's Apache can not start while another webserver is using port 80. Please turn it off and try again.
    /etc/extra/http-vhosts/httpd-vhosts.conf
    Code:
    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host.example.com"
        ServerName dummy-host.example.com
        ServerAlias www.dummy-host.example.com
        ErrorLog "logs/dummy-host.example.com-error_log"
        CustomLog "logs/dummy-host.example.com-access_log" common
    </VirtualHost>
    
    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host2.example.com
        DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host2.example.com"
        ServerName dummy-host2.example.com
        ErrorLog "logs/dummy-host2.example.com-error_log"
        CustomLog "logs/dummy-host2.example.com-access_log" common
    </VirtualHost>
    
    NameVirtualHost z:80
    <VirtualHost z:80>
            DocumentRoot "/Applications/XAMPP/htdocs/z"
            ServerName zend.loc
            ErrorLog "/Applications/XAMPP/htdocs/z/local-error.log"
            <Directory "/Applications/XAMPP/htdocs/z">
                    Allow from all
                    AllowOverride All
                    Order Allow,Deny
                    Allow from all
                    Require all granted
            </Directory>
    </VirtualHost>
    I have enabled # Virtual hosts vhosts in httpd.conf
    Code:
    Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf




    2 -
    Originally Posted by DonR
    since you are using Xampp, that is the only Apache conf you need to worry about or even mess with [as long as you never enabled the "web sharing" feature in MacOSX].
    Thank you. I am gonna be working with /Applications/XAMPP/etc.

    You see below I can see 3 /etc folders. Would you please explain why there are 3 /etc folders? I understand 2. One is for Mac as you said and 1 for XAMPP. But 3rd I am not sure. I assume /etc and /private/etc are the same.

    /etc
    Code:
    Behnam-Jazayeris-MacBook-Pro:etc pmdg3$ ls -la
    total 824
    drwxr-xr-x  94 root  wheel    3196 29 Oct 09:26 .
    drwxr-xr-x@  6 root  wheel     204  2 Mar  2012 ..
    -rw-r--r--   1 root  wheel     753 11 Feb  2010 6to4.conf
    -rw-------   1 root  wheel      24 18 Nov  2010 AFP.conf
    -rw-r--r--   1 root  wheel     515 11 Feb  2010 afpovertcp.cfg
    lrwxr-xr-x   1 root  wheel      15  2 Mar  2012 aliases -> postfix/aliases
    -rw-r-----   1 root  wheel   16384 11 Feb  2010 aliases.db
    -rw-r--r--   1 root  wheel   31925 11 Feb  2010 amavisd.conf
    drwxr-xr-x   9 root  wheel     306 25 Aug 09:49 apache2
    -rw-r--r--   1 root  wheel     860 11 Feb  2010 asl.conf
    -rw-r--r--   1 root  wheel   26013 17 Oct 08:56 authorization
    -rw-r--r--   1 root  wheel   24925  2 Mar  2012 authorization~previous
    -rw-r--r--   1 root  wheel      67 27 Feb  2010 auto_home
    -rw-r--r--   1 root  wheel     194 27 Feb  2010 auto_master
    -rw-r--r--   1 root  wheel    1759 27 Feb  2010 autofs.conf
    -r--r--r--   1 root  wheel     196 11 Feb  2010 bashrc
    -rw-r--r--   1 root  wheel      82  6 Apr  2012 com.apple.screensharing.agent.launchd
    -rw-r--r--   1 root  wheel     189 11 Feb  2010 csh.cshrc
    -rw-r--r--   1 root  wheel     121 11 Feb  2010 csh.login
    -rw-r--r--   1 root  wheel      39 11 Feb  2010 csh.logout
    drwxr-xr-x  10 root  _lp       340 25 Aug 09:51 cups
    drwxr-xr-x   3 root  wheel     102 19 May  2009 defaults
    -rw-r--r--   1 root  wheel    2378 11 Feb  2010 dnsextd.conf
    -rw-r--r--   1 root  wheel    1029 19 May  2009 efax.rc
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 find.codes
    -rw-r--r--   1 root  wheel     150 11 Feb  2010 fstab.hd
    -rw-r--r--   1 root  wheel      54 19 May  2009 ftpd.conf
    -rw-r--r--   1 root  wheel     119 11 Feb  2010 ftpusers
    -rw-r--r--   1 root  wheel    5678 11 Feb  2010 gettytab
    -rw-r--r--   1 root  wheel    1674 11 Feb  2010 group
    -rw-r--r--   1 root  wheel      87 11 Feb  2010 hostconfig
    -rwxrwxrwx@  1 root  wheel     532 29 Oct 09:26 hosts
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 hosts.equiv
    -rw-r--r--   1 root  wheel     236 11 Feb  2010 hosts~orig
    -r--r--r--   1 root  wheel    1299 11 Feb  2010 irbrc
    -rw-------   1 root  wheel      12 31 Oct  2011 kcpassword
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 kern_loader.conf
    -rw-------   1 root  wheel    1391  3 Jul  2010 krb5.keytab
    lrwxr-xr-x   1 root  wheel      38  2 Mar  2012 localtime -> /usr/share/zoneinfo/Australia/Brisbane
    -r--r--r--   1 root  wheel     616 19 May  2009 locate.rc
    drwxr-xr-x   3 root  wheel     102  2 Mar  2012 mach_init.d
    drwxr-xr-x   2 root  wheel      68 11 Feb  2010 mach_init_per_login_session.d
    drwxr-xr-x   2 root  wheel      68 11 Feb  2010 mach_init_per_user.d
    drwxr-xr-x   3 root  wheel     102  2 Mar  2012 mail
    -rw-r--r--   1 root  wheel     106 19 May  2009 mail.rc
    -rw-r--r--   1 root  wheel    4589 19 May  2009 man.conf
    -rw-r--r--   1 root  wheel      36 11 Feb  2010 manpaths
    drwxr-xr-x   4 root  wheel     136  6 Feb  2013 manpaths.d
    -rw-------   1 root  wheel    3929 11 Feb  2010 master.passwd
    -rwxr-xr-x   1 root  wheel     168  3 Jul  2010 memberd.conf
    -rw-r--r--   1 root  wheel  125811 11 Feb  2010 moduli
    -rw-r--r--   1 root  wheel    1238 31 Jul  2009 named.conf
    -r--r--r--   1 root  wheel      11 19 May  2009 nanorc
    -rw-r--r--   1 root  wheel      53 11 Feb  2010 networks
    -r--r--r--   1 root  wheel    1590 19 May  2009 newsyslog.conf
    drwxr-xr-x   4 root  wheel     136  2 Mar  2012 newsyslog.d
    -rw-r--r--   1 root  wheel     132 11 Feb  2010 notify.conf
    -rw-r--r--   1 root  wheel     366 19 May  2009 ntp-restrict.conf
    -rw-r--r--@  1 root  wheel      27  7 Aug 11:32 ntp.conf
    drwxr-xr-x   7 root  wheel     238 11 Feb  2010 openldap
    drwxr-xr-x  15 root  wheel     510 22 Mar  2012 pam.d
    -rw-r--r--   1 root  wheel    3669 11 Feb  2010 passwd
    -rw-r--r--   1 root  wheel      45 11 Feb  2010 paths
    drwxr-xr-x   4 root  wheel     136  6 Feb  2013 paths.d
    drwxr-xr-x   5 root  wheel     170 19 May  2009 periodic
    -r--r--r--   1 root  wheel   69060 16 Dec  2010 php.ini.default
    -r--r--r--   1 root  wheel   69060 16 Dec  2010 php.ini.default-5.2-previous
    drwxr-xr-x  21 root  wheel     714 22 Mar  2012 postfix
    drwxr-xr-x   2 root  wheel      68 27 Feb  2010 ppp
    -r--r--r--   1 root  wheel     189 11 Feb  2010 profile
    -rw-r--r--   1 root  wheel    5766 11 Feb  2010 protocols
    drwxr-xr-x   4 root  wheel     136  2 Mar  2012 racoon
    -rw-r--r--   1 root  wheel    1660 11 Feb  2010 rc.common
    -rw-r--r--   1 root  wheel    5142 11 Feb  2010 rc.netboot
    lrwxr-xr-x   1 root  wheel      20  2 Mar  2012 resolv.conf -> /var/run/resolv.conf
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 rmtab
    -rw-r--r--   1 root  wheel     971 11 Feb  2010 rpc
    -rw-r--r--   1 root  wheel     983 11 Feb  2010 rtadvd.conf
    drwxr-xr-x   7 root  wheel     238 16 Jun  2009 security
    -rw-r--r--   1 root  wheel  677959 11 Feb  2010 services
    -rw-r--r--   1 root  wheel     179 11 Feb  2010 shells
    -rw-r--r--   1 root  wheel    2975 22 Mar  2012 smb.conf
    -rw-r--r--   1 root  wheel    2955  2 Mar  2012 smb.conf.old
    -rw-r--r--   1 root  wheel    2975 28 Apr  2011 smb.conf.template
    -rw-r--r--   1 root  wheel    2955 11 Feb  2010 smb.conf~orig
    drwxr-xr-x   4 root  wheel     136 28 Jul  2009 snmp
    -rw-r--r--   1 root  wheel    1568  4 Oct 14:51 ssh_config
    -rw-r--r--   1 root  wheel    3723 11 Feb  2010 sshd_config
    -r--r-----   1 root  wheel    1242 23 Jun  2009 sudoers
    -rw-r--r--   1 root  wheel     772 11 Feb  2010 syslog.conf
    -rw-r--r--   1 root  wheel    1441 11 Feb  2010 ttys
    drwxr-xr-x   4 root  wheel     136 11 Feb  2010 xgrid
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 xtab
    -r--r--r--   1 root  wheel     126 11 May  2009 zshenv
    Behnam-Jazayeris-MacBook-Pro:etc pmdg3$ pwd
    /etc
    /Applications/XAMPP/etc
    Code:
    Behnam-Jazayeris-MacBook-Pro:etc pmdg3$ ls -la
    total 464
    drwxr-xr-x@ 25 root   admin    850 29 Oct 09:40 .
    drwxr-xr-x@ 24 root   admin    816 26 Sep 12:07 ..
    -rw-rw-r--@  1 root   admin  12292 26 Sep 12:07 .DS_Store
    drwxr-xr-x@ 16 root   admin    544 28 Feb  2010 extra
    -rw-r--r--@  1 root   admin   3572 28 Feb  2010 freetds.conf
    -rw-r--r--@  1 root   admin  18072 29 Oct 09:40 httpd.conf
    -rw-r--r--@  1 root   admin  17008 28 Feb  2010 httpd.conf.bak
    -rw-r--r--@  1 root   admin    362 28 Feb  2010 locales.conf
    -rw-r--r--@  1 root   admin  12958 28 Feb  2010 magic
    -rw-r--r--@  1 root   admin  37486 28 Feb  2010 mime.types
    -rw-rw-r--@  1 root   admin   2679 25 Apr  2013 my.cnf
    drwxr-xr-x@  4 root   admin    136 28 Feb  2010 openldap
    lrw-r--r--   1 pmdg3  admin     56 28 Feb  2010 openssl.cnf -> /Applications/xampp/xamppfiles/share/openssl/openssl.cnf
    drwxr-xr-x@  4 root   admin    136 28 Feb  2010 original
    -rw-r--r--@  1 root   admin   1630 28 Feb  2010 pear.conf
    -rw-rw-rw-@  1 root   admin  39802  9 Oct 10:23 php.ini
    -rw-r--r--@  1 root   admin    219 28 Feb  2010 pool.conf
    -rw-r--r--@  1 root   wheel   2103 28 Feb  2010 proftpd.conf
    -rw-rw-r--@  1 root   admin   1911 28 Feb  2010 proftpd.conf.orig
    drwxrwxr-x@  3 root   admin    102 28 Feb  2010 ssl.crt
    drwxrwxr-x@  3 root   admin    102 28 Feb  2010 ssl.key
    -rw-rw-r--@  1 root   admin  23953 28 Feb  2010 webalizer.conf
    -rw-r--r--@  1 root   admin  23930 28 Feb  2010 webalizer.conf.sample
    drwxrwxr-x@  4 root   admin    136 10 May  2011 xampp
    drwxr-xr-x@ 15 pmdg3  admin    510 26 Sep 11:51 zf2-tutorial
    Behnam-Jazayeris-MacBook-Pro:etc pmdg3$ pwd
    /Applications/XAMPP/etc
    /private/etc
    Code:
    Behnam-Jazayeris-MacBook-Pro:etc pmdg3$ ls -la
    total 824
    drwxr-xr-x  94 root  wheel    3196 29 Oct 09:26 .
    drwxr-xr-x@  6 root  wheel     204  2 Mar  2012 ..
    -rw-r--r--   1 root  wheel     753 11 Feb  2010 6to4.conf
    -rw-------   1 root  wheel      24 18 Nov  2010 AFP.conf
    -rw-r--r--   1 root  wheel     515 11 Feb  2010 afpovertcp.cfg
    lrwxr-xr-x   1 root  wheel      15  2 Mar  2012 aliases -> postfix/aliases
    -rw-r-----   1 root  wheel   16384 11 Feb  2010 aliases.db
    -rw-r--r--   1 root  wheel   31925 11 Feb  2010 amavisd.conf
    drwxr-xr-x   9 root  wheel     306 25 Aug 09:49 apache2
    -rw-r--r--   1 root  wheel     860 11 Feb  2010 asl.conf
    -rw-r--r--   1 root  wheel   26013 17 Oct 08:56 authorization
    -rw-r--r--   1 root  wheel   24925  2 Mar  2012 authorization~previous
    -rw-r--r--   1 root  wheel      67 27 Feb  2010 auto_home
    -rw-r--r--   1 root  wheel     194 27 Feb  2010 auto_master
    -rw-r--r--   1 root  wheel    1759 27 Feb  2010 autofs.conf
    -r--r--r--   1 root  wheel     196 11 Feb  2010 bashrc
    -rw-r--r--   1 root  wheel      82  6 Apr  2012 com.apple.screensharing.agent.launchd
    -rw-r--r--   1 root  wheel     189 11 Feb  2010 csh.cshrc
    -rw-r--r--   1 root  wheel     121 11 Feb  2010 csh.login
    -rw-r--r--   1 root  wheel      39 11 Feb  2010 csh.logout
    drwxr-xr-x  10 root  _lp       340 25 Aug 09:51 cups
    drwxr-xr-x   3 root  wheel     102 19 May  2009 defaults
    -rw-r--r--   1 root  wheel    2378 11 Feb  2010 dnsextd.conf
    -rw-r--r--   1 root  wheel    1029 19 May  2009 efax.rc
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 find.codes
    -rw-r--r--   1 root  wheel     150 11 Feb  2010 fstab.hd
    -rw-r--r--   1 root  wheel      54 19 May  2009 ftpd.conf
    -rw-r--r--   1 root  wheel     119 11 Feb  2010 ftpusers
    -rw-r--r--   1 root  wheel    5678 11 Feb  2010 gettytab
    -rw-r--r--   1 root  wheel    1674 11 Feb  2010 group
    -rw-r--r--   1 root  wheel      87 11 Feb  2010 hostconfig
    -rwxrwxrwx@  1 root  wheel     532 29 Oct 09:26 hosts
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 hosts.equiv
    -rw-r--r--   1 root  wheel     236 11 Feb  2010 hosts~orig
    -r--r--r--   1 root  wheel    1299 11 Feb  2010 irbrc
    -rw-------   1 root  wheel      12 31 Oct  2011 kcpassword
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 kern_loader.conf
    -rw-------   1 root  wheel    1391  3 Jul  2010 krb5.keytab
    lrwxr-xr-x   1 root  wheel      38  2 Mar  2012 localtime -> /usr/share/zoneinfo/Australia/Brisbane
    -r--r--r--   1 root  wheel     616 19 May  2009 locate.rc
    drwxr-xr-x   3 root  wheel     102  2 Mar  2012 mach_init.d
    drwxr-xr-x   2 root  wheel      68 11 Feb  2010 mach_init_per_login_session.d
    drwxr-xr-x   2 root  wheel      68 11 Feb  2010 mach_init_per_user.d
    drwxr-xr-x   3 root  wheel     102  2 Mar  2012 mail
    -rw-r--r--   1 root  wheel     106 19 May  2009 mail.rc
    -rw-r--r--   1 root  wheel    4589 19 May  2009 man.conf
    -rw-r--r--   1 root  wheel      36 11 Feb  2010 manpaths
    drwxr-xr-x   4 root  wheel     136  6 Feb  2013 manpaths.d
    -rw-------   1 root  wheel    3929 11 Feb  2010 master.passwd
    -rwxr-xr-x   1 root  wheel     168  3 Jul  2010 memberd.conf
    -rw-r--r--   1 root  wheel  125811 11 Feb  2010 moduli
    -rw-r--r--   1 root  wheel    1238 31 Jul  2009 named.conf
    -r--r--r--   1 root  wheel      11 19 May  2009 nanorc
    -rw-r--r--   1 root  wheel      53 11 Feb  2010 networks
    -r--r--r--   1 root  wheel    1590 19 May  2009 newsyslog.conf
    drwxr-xr-x   4 root  wheel     136  2 Mar  2012 newsyslog.d
    -rw-r--r--   1 root  wheel     132 11 Feb  2010 notify.conf
    -rw-r--r--   1 root  wheel     366 19 May  2009 ntp-restrict.conf
    -rw-r--r--@  1 root  wheel      27  7 Aug 11:32 ntp.conf
    drwxr-xr-x   7 root  wheel     238 11 Feb  2010 openldap
    drwxr-xr-x  15 root  wheel     510 22 Mar  2012 pam.d
    -rw-r--r--   1 root  wheel    3669 11 Feb  2010 passwd
    -rw-r--r--   1 root  wheel      45 11 Feb  2010 paths
    drwxr-xr-x   4 root  wheel     136  6 Feb  2013 paths.d
    drwxr-xr-x   5 root  wheel     170 19 May  2009 periodic
    -r--r--r--   1 root  wheel   69060 16 Dec  2010 php.ini.default
    -r--r--r--   1 root  wheel   69060 16 Dec  2010 php.ini.default-5.2-previous
    drwxr-xr-x  21 root  wheel     714 22 Mar  2012 postfix
    drwxr-xr-x   2 root  wheel      68 27 Feb  2010 ppp
    -r--r--r--   1 root  wheel     189 11 Feb  2010 profile
    -rw-r--r--   1 root  wheel    5766 11 Feb  2010 protocols
    drwxr-xr-x   4 root  wheel     136  2 Mar  2012 racoon
    -rw-r--r--   1 root  wheel    1660 11 Feb  2010 rc.common
    -rw-r--r--   1 root  wheel    5142 11 Feb  2010 rc.netboot
    lrwxr-xr-x   1 root  wheel      20  2 Mar  2012 resolv.conf -> /var/run/resolv.conf
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 rmtab
    -rw-r--r--   1 root  wheel     971 11 Feb  2010 rpc
    -rw-r--r--   1 root  wheel     983 11 Feb  2010 rtadvd.conf
    drwxr-xr-x   7 root  wheel     238 16 Jun  2009 security
    -rw-r--r--   1 root  wheel  677959 11 Feb  2010 services
    -rw-r--r--   1 root  wheel     179 11 Feb  2010 shells
    -rw-r--r--   1 root  wheel    2975 22 Mar  2012 smb.conf
    -rw-r--r--   1 root  wheel    2955  2 Mar  2012 smb.conf.old
    -rw-r--r--   1 root  wheel    2975 28 Apr  2011 smb.conf.template
    -rw-r--r--   1 root  wheel    2955 11 Feb  2010 smb.conf~orig
    drwxr-xr-x   4 root  wheel     136 28 Jul  2009 snmp
    -rw-r--r--   1 root  wheel    1568  4 Oct 14:51 ssh_config
    -rw-r--r--   1 root  wheel    3723 11 Feb  2010 sshd_config
    -r--r-----   1 root  wheel    1242 23 Jun  2009 sudoers
    -rw-r--r--   1 root  wheel     772 11 Feb  2010 syslog.conf
    -rw-r--r--   1 root  wheel    1441 11 Feb  2010 ttys
    drwxr-xr-x   4 root  wheel     136 11 Feb  2010 xgrid
    -rw-r--r--   1 root  wheel       0 11 Feb  2010 xtab
    -r--r--r--   1 root  wheel     126 11 May  2009 zshenv
    Originally Posted by DonR
    Does the MAC version of xampp have the xampp control center/panel where you can easily start/stop/restart apache, mysql?
    Yes. But I would like to be able to start and stop it with terminal rather than the graphical tool. How can I achieve that? I have a command that I need to know which server this command restarts?
    Code:
    sudo /usr/sbin/apachectl restart
    Thank you DonR
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    NameVirtualHost z:80
    <VirtualHost z:80>
    is not legal, only an IP address or * is allowed [to my knowledge] and you only need one NameVirtualHost statement unless you are setting up VirtulHosts on different ports, then, you need ONE for each port.
    So, get rid of NameVirtualHost z:80 and change <VirtualHost z:80> to <VirtualHost *:80>

    Only edit the *.conf's in /Applications/XAMPP/etc..don't worry about the other /etc directories as they are for the OS.

    sudo /usr/sbin/apachectl restart is actually "starting/restarting" the builtin OS's ApacheWebServer, so, issue a sudo /usr/sbin/apachectl stop to stop that instance of Apache.

    Any commands you use for controlling the XAMPP ApacheWebServer will have to be prefaced with /Applications/XAMPP/ .....
    I will need to do some research to find out what the folder/file structure is for XAMPP under MacOSX, to know what commands are available.

    EDIT:

    OK, this LINK shows you what commands are available to use to control XAMPP from the cmdline.
    All of those commands need to be ran in or prefaced by /Applications/XAMPP/xamppfiles/xampp and then the command.
    Last edited by DonR; October 29th, 2013 at 07:59 PM.
  12. #7
  13. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    Hi;
    Firs thing. Do you know about this?
    Code:
    bash-3.2# sudo /usr/sbin/apachectl stop
    launchctl: Error unloading: org.apache.httpd
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    Nope...but, what version of OSX are you running on your MacBook?

    sudo apachectl stop should work to stop the OS's Apache on whatever version you are running.
    Last edited by DonR; October 29th, 2013 at 08:16 PM.
  16. #9
  17. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    Originally Posted by DonR
    Nope...but, what version of OSX are you running on your MacBook?

    sudo apachectl stop should work to stop the OS's Apache on whatever version you are running.
    10.6.8
    I get the error
    bash-3.2# sudo apachectl stop
    launchctl: Error unloading: org.apache.httpd
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    THIS may shed some light on that error.
  20. #11
  21. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    This now works:
    Code:
    bash-3.2# sudo apachectl stop

    And when I force quit XAMPP controller and restart it, it shows that XAMPP Apache is already running. But it still does not allow me to restart Apache from XAMPP controller!




    Also would you please explain issue 1 on post # 5?

    Thank you
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    you keep going back and forth between the OS's Apache [sudo apachectl start/stop] and the XAMPP Apache so much that I'm starting to get confused myself.

    I've messed with MacOSX 10.5 a little but I'm no MAC user...there should be a way to see running processes. If you're lucky it will have option to see path for that process.
    Check to see which Apache (httpd) is actually running..and go from there.

    the reason you get the
    Code:
    Another webserver is already running!
    
    XAMPP's Apache can not start while another webserver is using port 80. Please turn it off and try again.
    is because either the OS's httpd process is still running or you are using multiple Listen 80 statements in your .conf files for XAMPP.

    Did you fix the errors in your /etc/extra/http-vhosts/httpd-vhosts.conf that I mentioned in post #5?
  24. #13
  25. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    I changed my conf file like this:
    Code:
    bash-3.2# cd extra/
    bash-3.2# ls 
    httpd-autoindex.conf		httpd-languages.conf		httpd-ssl.conf			httpd-xampp.conf.bak
    httpd-dav.conf			httpd-manual.conf		httpd-userdir.conf		startup.pl
    httpd-default.conf		httpd-mpm.conf			httpd-vhosts.conf
    httpd-info.conf			httpd-multilang-errordoc.conf	httpd-xampp.conf
    bash-3.2# cd httpd-vhosts.conf 
    bash: cd: httpd-vhosts.conf: Not a directory
    bash-3.2# cat httpd-vhosts.conf 
    #
    # Virtual Hosts
    #
    # If you want to maintain multiple domains/hostnames on your
    # machine you can setup VirtualHost containers for them. Most configurations
    # use only name-based virtual hosts so the server doesn't need to worry about
    # IP addresses. This is indicated by the asterisks in the directives below.
    #
    # Please see the documentation at 
    # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
    # for further details before you try to setup virtual hosts.
    #
    # You may use the command line option '-S' to verify your virtual host
    # configuration.
    
    #
    # Use name-based virtual hosting.
    #
    NameVirtualHost *:80
    
    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for all requests that do not
    # match a ServerName or ServerAlias in any <VirtualHost> block.
    #
    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host.example.com"
        ServerName dummy-host.example.com
        ServerAlias www.dummy-host.example.com
        ErrorLog "logs/dummy-host.example.com-error_log"
        CustomLog "logs/dummy-host.example.com-access_log" common
    </VirtualHost>
    
    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host2.example.com
        DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host2.example.com"
        ServerName dummy-host2.example.com
        ErrorLog "logs/dummy-host2.example.com-error_log"
        CustomLog "logs/dummy-host2.example.com-access_log" common
    </VirtualHost>
    
    <VirtualHost *:80>
            DocumentRoot "/Applications/XAMPP/htdocs/z"
            ServerName zend.loc
            ErrorLog "/Applications/XAMPP/htdocs/z/local-error.log"
            <Directory "/Applications/XAMPP/htdocs/z">
                    Allow from all
                    AllowOverride All
                    Order Allow,Deny
                    Allow from all
                    Require all granted
            </Directory>
    </VirtualHost>
    bash-3.2# vim httpd-vhosts.conf 
    bash-3.2#
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2009
    Location
    Nebraska, USA
    Posts
    876
    Rep Power
    276
    that CONF looks fine to me.
  28. #15
  29. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,689
    Rep Power
    171
    Originally Posted by DonR
    that CONF looks fine to me.
    Ok,

    1 more try:

    What other files beside XAMPP/etc/hosts and XAMPP/etc/extra/httpd-vhosts.conf do you need to see so you can confidently say:

    http://z show show the content of http://localhost/z

    Thank you
Page 1 of 3 123 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo