Web Sharing with 10.6.2 not working

mousebert

Registered
Greetings,

I apologize if this is already covered, but I did not find it with my search efforts. There are some threads that are close but different enough.

I am trying to create a web blog on my Mac (Mac OS X 10.6.2) using Apache and WordPress as a prototype before I publish it. I am new at this aspect of using the Macintosh. I want more control than I would get from just using a web blog service such as WordPress.com. I am using a Mac with dual 3 GHz Intel dual core processors with 6GB of ram. Norton Security is loaded but its firewall is turned off. I also have a separate firewall/router connected through which my home LAN accesses the cable modem box. (I don't currently have access to the devices as I write this, so I cannot tell if the external box has ping disabled.) I would be happy at the moment just to be able to view the web page/blog locally so I can learn what I am doing and debug it. I have in the distant pass, prior to 10.6, made a simple webpage with html and gotten it to run on my previous Mac.

Well it looks really simple but it is not working at all. I have gone into the System Preference and set Web Sharing to on, and even rebooted. I have placed what are supposed to be the appropriate files into ./Users/myshortname/Shares folder. System Preference indicates that I should be able to access the web page at http://192.168.0.36/~myshortname/

, but I get the following error message:

Safari can’t open the page at http://192.168.0.36/~myshortname/ because
Safari can’t connect to the server “192.168.0.36”.

Firefox is blank.

TOP indicates that httpd is running.

I have even gone through running a script from Apple for 10.5 that is supposed to fix it.

<Directory "/Users/myshortname/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

If I use FireFox or Safari to access http://127.0.0.1 I get
It Works!


But nada if I use the computers IP address. BTW, I cannot find the location of the index.html file for http://127.0.0.1

H E L P !

Please tell me what is wrong and how to fix it or please point me to
the correct place to get the information.
Thanks
 
You are connecting to your router's private IP address 192.168..., or something it forwards to.
A private IP address, not a public one.
You'll need to use a public IP address, and if that goes via a router, set it up so that the http traffic gets forwarded to your Mac.
 
I can check the port forwarding on the router but now there is another problem. In the past, I have not had a problem with what you suggested. I am getting the following error from http://127.0.0.1/

Safari can’t open the page “http://127.0.0.1/” because Safari can’t connect to the server “127.0.0.1”

The console gives the following error message on starting Web Sharing:

3/27/10 3:07:37 PM org.apache.httpd[934] httpd: Syntax error on line 459 of /private/etc/apache2/httpd.conf: Syntax error on line 15 of /private/etc/apache2/extra/httpd-userdir.conf: Syntax error on line 1 of /private/etc/apache2/users/pvford.conf: /private/etc/apache2/users/pvford.conf:1: <Directory> was not closed.

3/27/10 3:07:37 PM com.apple.launchd[1] (org.apache.httpd[934]) Exited with exit code: 1

3/27/10 3:07:17 PM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds

Which then repeats.

I have uploaded the current httpd.conf file.

the pvford.conf is as follows:

<Directory "/Users/pvford/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
 
Correct the syntax errors on line 459 of /private/etc/apache2/httpd.conf, line 15 of /private/etc/apache2/extra/httpd-userdir.conf, and line 1 of /private/etc/apache2/users/pvford.conf.

Where did you get the syntax for the file pvford.conf you are using?

If you remove or delete that file for a test, and correct the other errors in syntax, and restart httpd and apache, will you get it to work now?

Can you post those other lines it is complaining about of the above files?
 
Last edited:
Having a similar problem. I can't access my localhost/server IP
This is what I am getting:
httpd: Syntax error on line 459 of /private/etc/apache2/httpd.conf: Syntax error on line 15 of /private/etc/apache2/extra/httpd-userdir.conf: Syntax error on line 8 of /private/etc/apache2/users/+entropy-php.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): no suitable image found. Did find:\n\t/usr/local/php5/libphp5.so: no matching architecture in universal wrapper

I called apple two days in a row and even went in for an appointment today and no one could help. PLEASE, if anyone can help
 
GusHarsh, what are on those lines the syntax complains?

line 459 of /private/etc/apache2/httpd.conf

line 15 of /private/etc/apache2/extra/httpd-userdir.conf

line 8 of /private/etc/apache2/users/+entropy-php.conf --- here is one problem: /private/etc/apache2/users/+entropy-php.conf: Cannot load /usr/local/php5/libphp5.so

There also seems to be wrong architecture \n\t/usr/local/php5/libphp5.so present.

Configuring php isn't usually something they like to help with.

Also, what guide did you use for configuring php, and what version of Mac OS X do you have?
 
Thanks, I just got ride of the +entropy-php.conf file made some adjustments to the httpd.conf and that did the trick. Thanks
 
From another source, it was suggested that I use bbedit or wordwrangler to "clean" my conf files. I zapped gremlins and reset the char type and format (I think to Unix) and it started working as expected. So it appeared that there was junk noise in the file(s).

Thanks for the help.
 
Perhaps someone can help me too? I upgraded to leopard and localhost is gone.. I get "Safari can't open ... because Safari can’t connect to the server “localhost”... when I run apachetcl -t I get this:

/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
httpd: Syntax error on line 459 of /private/etc/apache2/httpd.conf: Syntax error on line 15 of /private/etc/apache2/extra/httpd-userdir.conf: Syntax error on line 7 of /private/etc/apache2/users/lasso8.conf: Cannot load /usr/libexec/apache2/Lasso8ConnectorforApache2.2.so into server: dlopen(/usr/libexec/apache2/Lasso8ConnectorforApache2.2.so, 10): image not found

any thoughts?

Dan
 
Back
Top