Mavericks Apache localhost unreachable

Hi there,
I have already read few thread about broken apache ;
unfortunatly I am still unable to make it work
Would you help me to repair my web server step by step ? Thanks
OS X is Mavericks.
I don't use any "AMP" package.
I did reformat my HD and re-install Mavericks then restore a Time Machine backup using Migrate Assistant.
Using Monitor I don't see any apachectl nor httpd process ?
Using Terminal :
sudo apachectl configtest : Syntax OK
sudo apachectl start : org.apache.httpd: Already loaded
That's all folks
No idea where to go à

Hi there.
I am not a UNIX warrior. I made many discoveries.
Here are some of the very interesting file and tools I found that solve the problem.
Launch Console
look the last log from Mavericks just after doing a sudo apachectl restart
I read a lot of (every 10 sec)
13/02/2014 18:59:19,688 ReportCrash[785]: Saved crash report for httpd[792] version 786 to /Library/Logs/DiagnosticReports/httpd_2014-02-13-185919_iMac.crash
If you click on the line it pop up and you see show "open report". If not, just look for the file and open it.
In the report I read :
PlugIn Path:       /Applications/ColdFusion10/*/mod_jk.so
PlugIn Identifier: mod_jk.so
PlugIn Version:    ??? (???)
re-open the httpd.conf
comment the line "Include /private/etc/apache2/mod_jk.conf"
Now Apache is Ok.
I was in trouble with ColdFusion.
Those logs files are gold as soon as you know where to find them.

Similar Messages

  • Apache /localhost not displaying images...

    I use a simple html file for Safari's homepage consisting of some CSS and 2 images -- this used to be placed in 'my' Sites folder.
    I upgraded from SL to Mav so have started Apache and moved my index.html plus images to /library/webserver/documents/ and have Safari's homepage pointed at http://localhost/index.html.
    It's a very simple page and opening the page in Safari works as expected but when using /localhost it doesn't display the images (?)!
    It's a small thing but I'd like to understand why it's not working, if anyone can help it'd be greatly appreciated.
    Thanks.

    You should be able to put it in the WebServer/Documents and run it from localhost.
    I altered the standard index.html in mine, adding one of the "PoweredByMacOSX" logos and it displayed the images. Are your image tags correct? I had thought you could add an image without the size elements, but it didn't work. I had to put the width and height elements in.
    EDIT: I went back and removed the size elements, then tried to open the html document in Safari and the image displayed. So, I went back to localhost and reloaded and the images appeared full size with out the size elements in the img tag.
    Message was edited by: Barney-15E

  • Scanning with Preview - "cannot write to folder" error

    I was scanning some photos yesterday using my epson 3170 scanner into Preview.
    These scanned & saved OK.
    then I installed a couple of Apple updates - one was the latest OS X security update and a java update.
    I then scanned something else and now I get a "cannot write to folder" error message preventing me from saving the scanned image (to the same folder I was saving the others to earlier).  I can save files to the same folder using other apps so there is nothing wrong with the drive or folder permissions.
    I scanned the image otthe desktop and moved the file to the folder I wanted.
    If I use ImageCapture it works OK as well.
    Any ideas why Preview won't let me save the images?

    Check the protections.  A command such as ls -ale@ or ls -aled@ would be typical for checking that.   I'd guess the files aren't writeable by the web server.  This'll probably be a chown and possibly a chmod command to bring the settings on the errant log(s) into agreement with the other settings on the other Apache web server logs that are being written.
    FWIW, I'd use zdump or cat and pipe the log contents elsewhere if I wanted to write to them.  But if you're resetting the logs, there's a rollover script around (the one that runs automatically on OS X, and I'm unfortunately drawing a blank on the name; it moved from the /etc/periodic stuff over to launchd a while back), or write your own short script that rolls the files and leaves the appropriate owner and permissions settings.
    There's an intro to the Mavericks Apache file set up at /library/server/web/config/apache2/readme.txt

  • MySQL FTP connection denied

    Hello all,
    I have a form with information to be placed in a data base.
    Everything works on my local machine with Apache server, PHP and
    MySQL database. My problem is I can't get a connection to the
    database in the production server. I receive the message "Access
    denied for user 'apache'@'localhost' (using password: NO)" when the
    form is submitting . When I set the production server as the
    testing server and try to make a MySQL Connection from Application
    -> Databases I receive 'Access Denied'. I know the information I
    am using is good because I can make a connection through the MySQL
    Administrator.
    I do not have access to the root area of the site. Is this
    the problem? Should I have the hosting service upload the
    Connections and the _mmscripts folders into the root area? I have
    read conflicting information about needing the _mmscripts folder.
    Any help would be greatly appreciated!!!!!!!!!!!!!!!!
    Thanks,
    Carol Davenport

    shegolfs wrote:
    > can't get a connection to the database in the production
    server. I receive the
    > message "Access denied for user 'apache'@'localhost'
    (using password: NO)" when
    > the form is submitting .
    Judging from your later comments, that's because the script
    isn't using
    the file in the Connections folder.
    > I do not have access to the root area of the site. Is
    this the problem? Should
    > I have the hosting service upload the Connections and
    the _mmscripts folders
    > into the root area?
    You need the _mmServerScripts folder only if you are using
    the remote
    server as a testing server. However, you do the Connections
    folder,
    which should normally be in the site root. However, it
    doesn't really
    matter where it is, as long as the script can find it. You
    could even
    copy and paste the contents of the connection file into the
    top of your
    PHP script. All it contains are the hostname, username, and
    password
    needed to connect to the database.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Importing Flash in Website?

    I am running on Dreamweaver CS5 in Code View...I have imported a flash video, which displays in design view, but will just keep loading in the actual browser and never start the video. It is running through an Apache localhost and is a PHP file...could that mess it up? I am also using jQuery with a bunch of hidden popup views, that work fine. What's wrong with my flash? Here is my source code to my flash video file:
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-4… width="496" height="310">
    <param name="movie" value="bornagain.swf">
    <param name="quality" value="high">
    <param name="wmode" value="opaque">
    <param name="swfversion" value="6.0.65.0">
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf">
    <param name="BGCOLOR" value="#333333">
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="bornagain.swf" width="496" height="310">
    <!--<![endif]-->
    <param name="quality" value="high">
    <param name="wmode" value="opaque">
    <param name="swfversion" value="6.0.65.0">
    <param name="expressinstall" value="Scripts/expressInstall.swf">
    <param name="BGCOLOR" value="#333333">
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <p><a href="http://www.adobe.com/go/getflashpl… src="http://www.adobe.com/images/shared/… alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>

    what's your url?

  • Design Mode works with Flash, LiveView and Browsers Don't?

    I am running on Dreamweaver CS5 in Code View...I have imported a flash video, which displays in design view, but will just keep loading in the actual browser and never start the video. It is running through an Apache localhost and is a PHP file...could that mess it up? I am also using jQuery with a bunch of hidden popup views, that work fine. What's wrong with my flash? Here is my source code to my flash video file:
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-4… width="496" height="310">
    <param name="movie" value="bornagain.swf">
    <param name="quality" value="high">
    <param name="wmode" value="opaque">
    <param name="swfversion" value="6.0.65.0">
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf">
    <param name="BGCOLOR" value="#333333">
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="bornagain.swf" width="496" height="310">
    <!--<![endif]-->
    <param name="quality" value="high">
    <param name="wmode" value="opaque">
    <param name="swfversion" value="6.0.65.0">
    <param name="expressinstall" value="Scripts/expressInstall.swf">
    <param name="BGCOLOR" value="#333333">
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
    <div>
    <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
    <p><a href="http://www.adobe.com/go/getflashpl… src="http://www.adobe.com/images/shared/… alt="Get Adobe Flash player" width="112" height="33" /></a></p>
    </div>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>

    Without seeing the page in a live/testing environment, can we assume that the "Scripts" folder that Dreamweaver is on the local/testing environment that you are having issues with?

  • To Deploy a Servlet using Tomcat

    I am trying to deploy an example servlet in tomcat.
    my example servlet code is
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    public class HitServlet extends HttpServlet {
    private int mCount;
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String message = "Hits: " + ++mCount;
    response.setContentType("text/plain");
    response.setContentLength(message.length());
    PrintWriter out = response.getWriter();
    out.println(message); } }
    i 've placed my servlet in the directory
    webapps/midp/WEB-INF/classes/HitServlet.java
    i've successfully compiled the code. Then started the tomcat server & thro' IE tried to open the url to http://localhost:8080/midp/hits.
    but i 'm receiving the error the servlet bob is missing. i've placed the web.xml & server.xml in the folders specified in the tutorial. in server.xml i've added the code
    <Context path="/midp" docBase="midp" debug="0" reloadable="true" privileged="true"/>
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>bob</servlet-name> <servlet-class>HitServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>bob</servlet-name> <url-pattern>/hits</url-pattern> </servlet-mapping> </web-app>
    If u can guide me to deploy the servlet it'll be very helpfull.
    With Best Regards
    Ramkumar

    one idea that I have is the CATALINA_HOME and CATALINA_BASE.
    We use CATALINA_BASE to install our stuff in another directory than that of the tomcat installation.
    in the tomcat-engine.log you should se sth similar to:
    2003-06-18 09:19:04 StandardHost[localhost]: Installing web application at context path /hits from URL file:<xxx/webapps/midp>
    2003-06-18 09:19:04 WebappLoader[/gtfn]: Deploying class repositories to work directory $CATALINA_BASE/work/Apache/localhost/gtfn
    ...

  • How to fix permission denied for home folder with Apache in Mavericks?

    I recently activated the apache that ships with OS X Mavericks. I followed some tutorial to set up the web-server, however. When I browse to my home-filter at http://localhost/~nazeem, I get the following error: You don't have permission to access /~nazeem/ on this server.
    Installation steps
    To set up the webserver, I took the following steps:
    1. activated the webserver with command: apachectl start
    2. enabled PHP by checking if the module is loaded
    3. checked if the home folder module is loaded
    4. made the user based configuration file, in /etc/apache2/users/nazeem.conf The content is as follows:
    <Directory "/Users/nazeem/Development/Websites/">
    Options Indexes MultiViews FollowSymLinks AllowOverride All
    </Directory>
    Permissions
    ~/nazeem : drwxr-xr-x+ ~/nazeem/Development : drwxr-xr-x ~/nazeem/Development/Websites : drwxr-xr-x
    Log
    The apache log says the following:
    [Mon May 19 21:22:57 2014] [error] [client ::1] client denied by server configuration: /Users/nazeem/Sites
    In my opinion this is remarkable, as the path /Users/nazeem/Sites is nog what I defined in my user configuration.
    Versions
    OS X Mavericks 10.9.3
    Apache 2.2.26
    Does anybody know how to solve this?

    nzm_aak wrote:
    I recently activated the apache that ships with OS X Mavericks. I followed some tutorial to set up the web-server, however. When I browse to my home-filter at http://localhost/~nazeem, I get the following error: You don't have permission to access /~nazeem/ on this server.
    Does anybody know how to solve this?
    You will have to contact the author of that tutorial and ask. Apache can be configured an infinite number of ways. You seem to be attempting to configure it in two conflicting methods. You can define specific directories on your web server or you can use mod_userdir. You can't hack up a combination of the two.
    I posted my own User Tip on how to configure Apache: https://discussions.apple.com/docs/DOC-3083
    This user tip only covers mod_userdir and will serve content out of $(HOME)/Sites. I strongly suggest starting there and only trying a custom location later, if you see the need.

  • Since updating to FF 5.0, I can no longer access my MAMP server (Mac/Apache/MySQL/PHP) Wordpress development site on my Localhost computer (MacBook Pro, OSX 10.6.4). Why not? It's running EXTREMELY SLOWLY when I try to access the pages on my site.

    PROBLEM WITH LOCALHOST SITE LOADING VERY SLOWLY (IF AT ALL) AFTER I UPGRADED FIREFOX TO 5.0 FROM 3.6
    I have been successfully running MAMP, a personal Apache server with MySQL, on my MacBook Pro using OSX 10.6.4. This is so I can create a Wordpress blog locally to later upload to my remote website.
    Yesterday, I updated my Firefox browser from 3.6 to 5.0 (and added the following extensions: Better Privacy 1.51, Bloody Vikings! 0.5.3, Copy as HTML Link 2.0, Firebug 1.7.3, Firepicker 1.3.4, NoScript 2.1.1.2, and Ultimate Free Stock Photo Search Add-on 1.0.1, TypeGauge 0.5, and Zotero 2.1.8)
    Now, I'm having trouble: At first, MySQL database server in MAMP wouldn't turn on at all. I restarted both Firefox and MAMP a few times. Finally, MySQL turned on and MAMP started to load into the browser. But it got only as far as the top bar on the MyPHP page, and would not load the rest of the page. Finally, pages do load, but I'm getting a "Waiting for localhost…" message looping at the lower left screen for a VERY LONG TIME (30-60 sec?) before my localhost web page appears (sometimes it says "Read localhost…").
    But even when the localhost pages appears, it continues to run VERY SLOWLY when the browser tries to load the pages (although it runs a little less slowly when I use only the backend Wordpress administration pages). In short, it seems that something is stopping Firefox from accessing the MySQL database properly so that my site can show up as quickly as it did before.
    Since this mess only happened after I upgraded to Firefox 5.0 and added the plugins, and nothing else has changed on my computer, it seems the Firefox 5.0 app and/or an extension is the culprit.
    Can you advise me ASAP about what to do? If not, I'll have to downgrade to 4.0 or something. I've got deadlines to meet.
    Thank you.

    PROBLEM WITH LOCALHOST SITE LOADING VERY SLOWLY (IF AT ALL) AFTER I UPGRADED FIREFOX TO 5.0 FROM 3.6
    I have been successfully running MAMP, a personal Apache server with MySQL, on my MacBook Pro using OSX 10.6.4. This is so I can create a Wordpress blog locally to later upload to my remote website.
    Yesterday, I updated my Firefox browser from 3.6 to 5.0 (and added the following extensions: Better Privacy 1.51, Bloody Vikings! 0.5.3, Copy as HTML Link 2.0, Firebug 1.7.3, Firepicker 1.3.4, NoScript 2.1.1.2, and Ultimate Free Stock Photo Search Add-on 1.0.1, TypeGauge 0.5, and Zotero 2.1.8)
    Now, I'm having trouble: At first, MySQL database server in MAMP wouldn't turn on at all. I restarted both Firefox and MAMP a few times. Finally, MySQL turned on and MAMP started to load into the browser. But it got only as far as the top bar on the MyPHP page, and would not load the rest of the page. Finally, pages do load, but I'm getting a "Waiting for localhost…" message looping at the lower left screen for a VERY LONG TIME (30-60 sec?) before my localhost web page appears (sometimes it says "Read localhost…").
    But even when the localhost pages appears, it continues to run VERY SLOWLY when the browser tries to load the pages (although it runs a little less slowly when I use only the backend Wordpress administration pages). In short, it seems that something is stopping Firefox from accessing the MySQL database properly so that my site can show up as quickly as it did before.
    Since this mess only happened after I upgraded to Firefox 5.0 and added the plugins, and nothing else has changed on my computer, it seems the Firefox 5.0 app and/or an extension is the culprit.
    Can you advise me ASAP about what to do? If not, I'll have to downgrade to 4.0 or something. I've got deadlines to meet.
    Thank you.

  • While opening most of the website i am getting error: Apache Tomcat/5.5.25-Error report. I have upgraded OS of MacBook Air from Maverick 10.9 to Yosemite 10.10 two days before. Kindly help.

    while opening most of the website on Safari i am getting error: Apache Tomcat/5.5.25-Error report. I have upgraded OS of MacBook Air from Maverick 10.9 to Yosemite 10.10 two days before.
    HTTP Status 404 - /ssssportal.war/fup_gpon_1m_6g_512k.jspp
    type Status report
    message /ssssportal.war/fup_gpon_1m_6g_512k.jspp
    description The requested resource (/ssssportal.war/fup_gpon_1m_6g_512k.jspp) is not available.
    Kindly help. Also I am getting spinning ball most of the time. This was not with OS X Maverick 10.9.

    while opening most of the website on Safari i am getting error: Apache Tomcat/5.5.25-Error report. I have upgraded OS of MacBook Air from Maverick 10.9 to Yosemite 10.10 two days before.
    HTTP Status 404 - /ssssportal.war/fup_gpon_1m_6g_512k.jspp
    type Status report
    message /ssssportal.war/fup_gpon_1m_6g_512k.jspp
    description The requested resource (/ssssportal.war/fup_gpon_1m_6g_512k.jspp) is not available.
    Kindly help. Also I am getting spinning ball most of the time. This was not with OS X Maverick 10.9.

  • Localhost result in 403 Error (Apache Issue)

    Trying to access my localhost through browser and i get the error below in browser.
    Forbidden
    You don't have permission to access / on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
    I recently was trying to install MySQL, phpmyadmin and Start Apache, after having no luck i try to install the software XAMPP, then after messing around with the software i didn't like it cause of the latency issue and stuff so i uninstall it. then i start getting the error above.
    Path i have taken to solve the issue:
    Configure Apache httpd.conf file "DocumentRoot" to users/username/Sites
    Restart Apache
    Set /etc/apache2/users/username.conf
    Change File Permissions through Terminal, to be honest i can't understand this fully
    I really appreciate anyone help, thanks in advanced.

    If I was debugging this I would want to know if the Apache user could access /users/username/Sites.  I'm assuming you've actually set that to your home directory, /Users/<your username>/Sites  ?  That seems a little unusual, it's normally set to /Library/WebServer/Documents, isn't it?
    If you want to access your own stuff from Sites, then I would have thought you would need http://localhost/~username.  That works OK on my system.
    Hope this helps - if you don't really understand file permissions, I can see you may have some problems - hopefully someone with lots of time will come along and help you out!  Good luck!

  • Apache can't start with " error resolving localhost ..."

    Hi,
    I have Oracle 9.2.0.4 installed on a White Box Linux. This installation for some reason shows an Apache problem:
    When I try to start Apache then I have an error message stating the following
    "date and time [error] OPM: PRIV: error resolving host name localhost"
    then a message saying that httpd could not be started.
    This error is not added to the log file but displayed instead on the screen. Morever, files with names mm.*.sem and mm.*.mem are created in $ORACLE_HOME/Apache/Apache/logs.
    When I try "ping localhost" on this machine I have no problem and the name is correctly resolved!
    Can any one please tell me what could it be?

    Michel -
    Any time. That's quite odd. And has your /etc/hosts
    file changed at all? Is the first line setup
    correctly to only include localhost and
    localhost.localdomain?Yes it is.
    Are you calling apachctl from
    $ORACLE_HOME/Apache/Apache/bin? Well, I copy the file to /etc/init.d and launch Apache from there at startup. The reason is that I have changed the ports on which Apaceh will listen to 80.
    You said you could
    ping localhost successfully, but have you been able
    to ping the localhost by name?Yes. I did. Note please that the name of the machine is lx_26_100.
    ping localhost
    ping 127.0.0.1
    ping lx_26_100
    ping 10.26.1.100
    All of that works fine!
    Have you tried
    changing the value of the ServerName parameter from
    the localhost's name to its IP address?
    Well I didn't try this. I'll try it. However, the error message doesn't speak about lx_26-100 but instead it speaks about localhost not beeing resolved.
    By the way, what are the files mm.*.mem and mm.*.sem in the logs of Appache?
    -shawnThanks Shawn.

  • Have Mavericks OS and having difficulty opening Apache OpenOffice after installation.

    Have Mavericks OS and  installed  Apache OpenOffice 4.0 on my new iMAC. When I tried to open the program I received this message: "OpenOffice cannot be opened because it is from an unidentified developer.  Anyone care to suggest a solution?

    The problem was successfully addressed in the side bar "more like this" under "RE:how to install Apache OpenOffice". By selecting "system preferences", and then "security & privacy", and selecting "allow apps to be downloaded from anywhere" I could successfully open the program. Thanks to all for the helpful suggestions.

  • Does Apache Virtual Hosting work with localhost?

    I'm a newbie trying to learn how apache web server works. I've activated apache web server on my Mac PowerBook G4, and tweaked the config file to get PHP, SSI and CGI working.
    If I type the url http://127.0.0.1/ I get the same page as http://localhost/
    If localhost is the domain name for the address 127.0.0.1, can I assign other domain names to 127.0.0.1 using apache's virtual hosting?
    Ti Powerbook G4   Mac OS X (10.4.4)  

    localhost is defined as 127.0.0.1. You can use them interchangeably.
    As for virtual hosts, sure. Apache doesn't care.
    There are two ways of running virtual hosts.
    Port-based virtual hosts use a port number other than the standard 80. They can be accessed via something like http://localhost:8000/
    Name-based virtual hosts look at the hostname header in the request to work out which site to serve. You can run any number of sites on the same port number this way, but you need to be able to control DNS so that it points to your machine.
    If you are just testing this locally you can edit /etc/hosts to add whatever hostnames you like;
    127.0.0.1 localhost my.testsite.com me.mydomain.com
    Now when you enter 'my.testsite.com' or 'my.mydomain.com' in your web browser, /etc/hosts will resolve this to 127.0.0.1 and you'll talk to your local apache server.
    Note that the localhost entries don't have to be in your domain. You can use this to override any real hostname you like.
    Of course, if you want remote users to access this site you'll need to setup something in the DNS, or edit their /etc/hosts files individually.

  • Apache error log shows localhost requests going to /var/empty

    ( 1 )'/etc/apache2/httpd.conf' shows the DocumenRoot as '/Library/WebServer/Documents', as has been standard for previous OSX versions.
    ( 2 ) Create a simple php file 'local_info.php' and drop it into the DocumenRoot.
    ( 3 ) try to access : https://localhost/local_info.php
    ( 4 ) the page is not served, and I get a 'Not Found' error.
    ( 5 ) Go to '/var/log/apache2/error_log'
    [Sat Feb 04 15:21:48 2012] [error] [client ::1]
        script '/var/empty/local_info.php' not found or unable to stat
    ( 6 ) If I go to 'System Preferences -> Sharing -> Web Sharing' and restart Apache, then try to access the page nothing changes, the 'Not Found' error persists.
    ( 7 ) If I copy 'local_info.php' from '/Library/WebServer/Documents/local_info.php' to '/var/empty/local_info.php' and then point the browser to
    ( 8 ) try to access : https://localhost/local_info.php
          the page is displayed correctly.
    This is basically pretty much pristine copy of 'OS X Lion -> OS X Lion Server' with 'Server.app -> Services -> Web' turned off for the moment. During this testing phase I am only trying '/Library/WebServer/Documents', and not the virtual hosts.
    I have the virtual hosts working very well through 'Server.app -> Services -> Web' which like I said above is turned off for the moment. The only problem I ran into there was that '/etc/hosts' was not being modified when a new virtual host was added via 'Server.app -> Services -> Web', but that was under OS X Server Lion 10.7.2, since I created the virtual hosts, I installed the Combo Updater for Lion Server 10.7.3, and I have not tried to create any new virtual hosts since then.
    It is interesting that towards the bottom of httpd.conf there are some flags that load different pieces of code depending upon what flags are set. What is even more interesting is that both 'Server.app -> Services -> Web', and 'System Preferences -> Sharing -> Web Sharing' use one common '/etc/apache2/httpd.conf' file, which depending upon which flags are set during Apache startup load different config code. At least I think it is interesting...
    These are the flags I noticed in /etc/apache2/httpd.conf
    <IfDefine !MACOSXSERVER>
    <IfDefine MACOSXSERVER>
    <IfDefine WEBSERVICE_ON>
    <IfDefine !WEBSERVICE_ON>
    <IfDefine WEBSHARING_ON>
    # Here only 'System Preferences -> Sharing -> Web Sharing' is running
    $ ps aux | grep httpd
    root            ... /usr/sbin/httpd -D FOREGROUND -D MACOSXSERVER -D WEBSHARING_ON
    _www            ... /usr/sbin/httpd -D FOREGROUND -D MACOSXSERVER -D WEBSHARING_ON
    # Here only 'Server.app -> Services -> Web' is running
    $ ps aux | grep httpd
    root            ... /usr/sbin/httpd -D FOREGROUND -D MACOSXSERVER -D WEBSERVICE_ON
    _www            ... /usr/sbin/httpd -D FOREGROUND -D MACOSXSERVER -D WEBSERVICE_ON
    $
    # Here both 'Server.app -> Services -> Web', and 'System Preferences -> Sharing -> Web Sharing' are running
    $ ps aux | grep httpd
    _www            ... /usr/sbin/httpd -D FOREGROUND -D MACOSXSERVER -D WEBSERVICE_ON -D WEBSHARING_ON
    root            ... /usr/sbin/httpd -D FOREGROUND -D MACOSXSERVER -D WEBSERVICE_ON -D WEBSHARING_ON
    $
    Here's some handy stuff that is echoed to my terminal for easy access
    # Some handy commands to access the files I use regularly...
    sudo open -a /Applications/BBEdit.app /etc/hosts
    sudo open -a /Applications/BBEdit.app /etc/php.ini
    sudo open -a /Applications/BBEdit.app /etc/bashrc
    open -a /Applications/BBEdit.app ~/.bash_profile
    open -a /Applications/BBEdit.app ~/.bashrc
    open -a /Applications/BBEdit.app ~/.bash_history
    # Or I can open all three at the same time
    open -a /Applications/BBEdit.app /etc/bashrc ~/.bash_profile ~/.bashrc
    To (show|hide) files set AppleShowAllFiles (true|false) and kill the finder
    defaults write com.apple.Finder AppleShowAllFiles true
    KillAll Finder
    Hopefully Apple will get this problem fixed quickly so that 'System Preferences -> Sharing -> Web Sharing' works correctly...
    Bill Hernandez
    Plano, Texas

    I've learned some interesting things since I posted the original message on this thread a couple of days ago.
    I had looked at the 'Include directives towards the bottom of httpd.conf, and I did a quick search on 'DocumentRoot' and hit the 'previous' button in BBEdit's find dialog. Sure enough it came up with:
    DocumentRoot "/Library/WebServer/Documents"
    However if I would have started the search from the top of the document I would have noticed that '/var/empty' that I found in the logs was not a bug, not an error, but by design.
    If I would have gone a few lines further up I would have seen :
    <IfDefine MACOSXSERVER>
    DocumentRoot /var/empty
    which explains it all. How incredibly cool, this is really clever!
    This morning I went back to httpd.conf
    sudo open -a /Applications/BBEdit.app /etc/apache2/httpd.conf
    and right at the top of the document staring me right in the face was:
    # Mac OS X / Mac OS X Server
    # The <IfDefine> blocks segregate server-specific directives
    # and also directives that only apply when Web Sharing or
    # server Web Service (as opposed to other services that need Apache) is on.
    # The launchd plist sets appropriate Define parameters.
    # Generally, desktop has no vhosts and server does; server has added modules,
    # custom virtual hosts are only activated when Web Service is on, and
    # default document root and personal web sites at ~username are only
    # activated when Web Sharing is on.
    Basically on the Lion Server you are not relying on DocumentRoot, everything is done via the VIrtual Hosts in 'Server.app -> Services -> Web'.
    The default Virtual Host when you first launch 'Server.app -> Services -> Web' is <whatever_hostname_you_gave_your_computer>.local, and it points to /Library/Server/Web/Data/Sites/Default, at this point there is no localhost defined as you are used to seeing, there is only /var/empty.
    As soon as you create a localhost Virtual host in 'Server.app -> Services -> Web', and the instance of Apache stops and restarts everything works as expected, http://localhost shows a webpage with 'It works!'.
    The moral to this whole story is that after having read/modified countless httpd.conf documents, and manually creating the Virtual Hosts, and Includes, and not bothering to read '/etc/apache2/httpd.conf' for Lion Server, it is currently printing and I have my yellow highlighter ready so I can go through it and expand the wisdom level from none to minimal...
    I am off to read !
    Oh, one thing I did do is drop a copy of a 'local_info.php' that I created that provides some info during testing while I am figuring all this out, but basically the gist is that I put this : <?php echo(__FILE__); ?> along with some other little bits of info anytime the page was hit. I dropped it into several of the virtual hosts I created to make sure I understand how this is all working.

Maybe you are looking for

  • How can i create a dynamic cavs simultor for single webservice.

    im using CAVS to create simulator . im able to created a simulator that returns a predefined response for any request.but is it possible to create a simulator that can generate response dynamically base on data in the request?.

  • Computer starts up but HD and Menu bar are not visible?

    Recently my Powerbook G4 began to act strangely and either freeze or slow way down for the first time in its four years of use. I have a new IMac to replace it. Here is my current problem: I'm trying to copy over some files via Firewire. I start my p

  • Sender JDBC with Stored Procedure or Function

    Hi. I have a problem to update a row that I obtain from sender JDBC (using SELECT or calling to a FUNCTION). As the consultation is so complex and the table has fed up transactions, often it takes the registry “A” and updates register “B”. Try to use

  • Picture as background. no filling.

    Hey there, is it possible to submit a picture as a backround without any fillings. i want to see the pic only. no filling or something. cant figure out how. i managed it to have no filling on top and on the left side and below. but theres allways one

  • Cannot buy another logic pro licence as it is already installed on machine

    I know this is no Logic thing, but I definitively hope that anyone from Apple is reading along. Started a new business and keep that old SL machine already equipped with Logic Pro + MainStage. The other licence will get used by the other business. As