Web sharing with Apache: Forbidden
My Mac OS X 10.8 Mountain Lion Upgrade broke local web sharing of my ~/Sites/ directories.
I googled around and followed the advice in http://support.apple.com/kb/TA25038 , which matches my problem closely. However, that solution does not repair the problem.
My Sites directory and permissions:
v21837:~ drf$ ls -la ~/Sites
total 7160
drwxr-xr-x 19 drf staff 646 Aug 7 14:06 .
drwxr-xr-x+ 197 drf staff 6698 Aug 6 17:44 ..
-rw-r--r--@ 1 drf staff 12292 Aug 3 21:26 .DS_Store
-rw-r--r-- 1 drf staff 0 Feb 2 2008 .localized
-rw-r--r-- 1 drf staff 3 Aug 7 14:06 00Junk.txt
Safari on http://localhost/~drf/00Junk.txt:
Forbidden
You don't have permission to access /~drf/00Junk.txt on this server.
Safari on a non-existent file:
Forbidden
You don't have permission to access /~drf/Junk.txtq on this server.
I solved my problem. I had cut and pasted the information into the /etc/apache2/users/UserName.conf file from a web page and used non-matching up/down quote marks like this:
<Directory “/Users/username/Sites/”>
rather than matching ones like:
<Directory "/Users/username/Sites/">
Apache seemed to parse it OK with 'apachectl -t', but with the up/down quotation marks, it did not enable my directory, apparently taking the quotes as literal parts of the directory name.
Similar Messages
-
Web Sharing and Apache losing connection?
ok so i just did a fresh install of 10.4 on my server (PowerMac G4 - 350 Mhz) i have set up my web sharing with a few tweaks like turned mod_ssl and installed MySQL. Other than that it's a pretty basic config.
My problem is that i when i start or restart apache everything works and stays that way for hours as I am updating and testing. I go home at night and come back in the morning and i can not access any of my sites nor the local ip of the server (192.168.0.100) or 127.0.0.1
so i restart apache and its back up...
i do have a static IP so I know its not my IP Changing
any ideas on keeping apache alive?What do the logs have to say about it?
There's nothing anyone here can tell you about why it's stopping - there are just too many posibilities. The server logs, though, might provide some clues.
Check specifically /var/log/httpd/error_log and /var/log/system.log -
Web sharing not working (Forbidden error)
http://localhost/~myusername doesnt work with web sharing turned on.
http://192.168.0.102/ (my local IP on the network) also fails to work.
It won't open locally or from other computers on the network.
I tried the apple fix here http://support.apple.com/kb/TA25038
Doesn't help.
The exact error I get is
Forbidden
You don't have permission to access /index.html on this server.
Apache/2.2.20 (Unix) DAV/2 Server at 192.168.0.102 Port 80No one can help?
I've tried everything I can think of/google. -
Ok...I want to set up web sharing on my computer but so far my attempts have failed.
I have an intel iMac with Leopard 10.5.2 installed and I have the latest Airport extreme base station (With draft n).
I turn on web sharing, and of course it works locally but not when trying to be accessed over the internet.
Now I realize that by default my routers address wont let anyone connect to my computer over the internet.
My router has an ip of 10.0.1.1, and I assigned my computer a static ip address of 10.0.1.200.
Now in the network preferences pane and the airport category, i set my computers IP (the 10.0.1.200), I put the gateway as 255.255.255.0, the router as 10.0.1.1 and the DNS as 10.0.1.1
Now going over to the airport utility I added a new entry in the port mapping section, with port 80 (both public and private) and the IP of my machine, 10.0.1.200.
Now in theory this should work but NOOOOO.
Does anyone have the same setup? a wireless network with the new airport extreme base station and has successfully configured Web Sharing?
Thanks in advance.
FelipeWell here is an update.
I saw an entry in apple support that said I had to change some setting in the apache folder /etc/apache2 in order to avoid getting the 403 forbidden error. I tried this and it did not work, i checked my user configuration file as well and the path to my home site directory was correct
Anyone here have a similar setup and has it working? It shouldnt be too hard to set up web sharing through a router. It has to be possible or else a lot of people would not buy a router because of this.
thanks in advance to anyone kind enough to help
Bye. -
Start web sharing with terminal
Hi All
in os 10.6 I can start web sharing simply using this command in the terminal:
sudo apachectl start
this is the same that enabling web sharing in the system preferences.
Now in os 10.7 it don't works.
Using
sudo /usr/sbin/httpd -k start -D WEBSHARING_ON
it seems works but system preferences still show web sharing disabled and after restarting computer, web sharing is disabled
someone can help me?Perhaps you're thinking of the SnowLeopard behavior. In Lion, starting Web Sharing is not exactly the same as starting httpd. Please inspect the contents of org.apache.httpd.plist, before and after starting Web Sharing in System Prefs, and it will help you understand. Before, you'll see something like:
<key>ProgramArguments</key><array>
<string>/usr/sbin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
</array>
After starting it, you'll see the WEBSHARING_ON flag added:
<key>ProgramArguments</key><array>
<string>/usr/sbin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
<string>-D</string>
<string>WEBSHARING_ON</string>
</array>
And, have you noticed that even if you load the launchd.plist with -w, the Disabled flag in the launchd.plist is always set to True? That's because the actual state of the launchd job is reflected in this file:
/var/db/launchd.db/com.apple.launchd/overrides.plist
Finally, apachectl start/stop simply loads and unloads the launchd.plist. -
Web Sharing with custom domain name
Hi,
I am wondering if I can use a custom domain name with the built in web sharing. Instead of it going to http://10.0.0.2/ it will be http://www.mydomain.com/. Thanks in advance.
RyanI have GoDaddy hosted domain name which I have setup to forward all web traffic to my ISP provided web page (eg http://my.webpage.ISP.com/account-name).
There is nothing magical about that URL. So I do not see any reason why you can not use your DynDNS.org name. -
:confused; Has anyone worked with apache CXF as a backend web
service. I loaded the wsdl in with the data import tool and it did
grab the wsdl correctly. I ended up running a network sniffer to
see if the actual values being passwd to the backend were being
done correctly. However my apache CXF puked with null values. Is
the data import tool ready for prime time ? Anyone ?
Thanks
Here is the dump of the network.
0x0350: 6164 6420 786d 6c6e 733a 746e 733d 2268
add.xmlns:tns="h
0x0360: 7474 703a 2f2f 4465 6661 756c 744e 616d
ttp://DefaultNam
0x0370: 6573 7061 6365 223e 0a20 2020 2020 203c
espace">.......<
0x0380: 746e 733a 6164 643e 0a20 2020 2020 2020
tns:add>........
0x0390: 203c 746e 733a 6172 6730 3e35 3c2f 746e
.<tns:arg0>5</tn
0x03a0: 733a 6172 6730 3e0a 2020 2020 2020 2020
s:arg0>.........
0x03b0: 3c74 6e73 3a61 7267 313e 363c 2f74 6e73
<tns:arg1>6</tns
0x03c0: 3a61 7267 313e 0a20 2020 2020 203c 2f74
:arg1>.......</t
0x03d0: 6e73 3a61 6464 3e0a 2020 2020 3c2f 746e
ns:add>.....</tn
0x03e0: 733a 6164 643e 0a20 203c 2f53 4f41 502d
s:add>...</SOAP-
0x03f0: 454e 563a 426f 6479 3e0a 3c2f 534f 4150
ENV:Body>.</SOAP
0x0400: 2d45 4e56 3a45 6e76 656c 6f70 653e
-ENV:Envelope>:confused; Has anyone worked with apache CXF as a backend web
service. I loaded the wsdl in with the data import tool and it did
grab the wsdl correctly. I ended up running a network sniffer to
see if the actual values being passwd to the backend were being
done correctly. However my apache CXF puked with null values. Is
the data import tool ready for prime time ? Anyone ?
Thanks
Here is the dump of the network.
0x0350: 6164 6420 786d 6c6e 733a 746e 733d 2268
add.xmlns:tns="h
0x0360: 7474 703a 2f2f 4465 6661 756c 744e 616d
ttp://DefaultNam
0x0370: 6573 7061 6365 223e 0a20 2020 2020 203c
espace">.......<
0x0380: 746e 733a 6164 643e 0a20 2020 2020 2020
tns:add>........
0x0390: 203c 746e 733a 6172 6730 3e35 3c2f 746e
.<tns:arg0>5</tn
0x03a0: 733a 6172 6730 3e0a 2020 2020 2020 2020
s:arg0>.........
0x03b0: 3c74 6e73 3a61 7267 313e 363c 2f74 6e73
<tns:arg1>6</tns
0x03c0: 3a61 7267 313e 0a20 2020 2020 203c 2f74
:arg1>.......</t
0x03d0: 6e73 3a61 6464 3e0a 2020 2020 3c2f 746e
ns:add>.....</tn
0x03e0: 733a 6164 643e 0a20 203c 2f53 4f41 502d
s:add>...</SOAP-
0x03f0: 454e 563a 426f 6479 3e0a 3c2f 534f 4150
ENV:Body>.</SOAP
0x0400: 2d45 4e56 3a45 6e76 656c 6f70 653e
-ENV:Envelope> -
Web sharing and apache server down
Hi all
Sorry for this noobie question but it's the first time I have this strange behavior
Today I tried to use my MBP (under Lion 10.7.4) outside of my home in a location where web connection was not permitted.
I thought I could continue to work on my web project which is at the moment on a localhost server.
But it was impossible as the web sharing was down and it was impossible to relaunch it through preferences panes.
did I missed something in my Apache config or somewhere else as I am pretty sure that this behavior should be the correct one it should be possible to have the apache server running even if not connected to the web.?
Obviously once returned at home and reconnected to the web all going back at normal.
Thanks in advance for your help
BR
BKantiqueFinally I found by myself, apparently I my apache server pointed on the port 80 which once disconnected of the web cause to Apache to be down.
Changed the port into 8080 and then no issue anymore the Apache server still on once disconnected of the web -
Personal Web Sharing aka Apache Config
I have turned on 'Personal Web Sharing' and created a fairly basic test web site in /Users/<user>/Sites that gets picked up readily and quickly by IE on computers on my LAN. However, trying to view the site locally has me confused. When I run Safari or Firefox and manually type in the URL ("http:/IP/~user"), it takes several minutes for each page to load, and Safari doesn't get any of the images that are included. If I select the link in the Sharing panel in System Preferences, the site is accessed almost instantly. The one difference I have noted is that, when typing the URL manually in to the browser, the IP address is changed to the computer name, e.g., "computer.local/~user", whereas when the link in System Preferences is used the URL uses the IP address, e.g., "192.168.0.10/~user". Any thoughts?
Thanks.ShutterMonkey wrote:
The one difference I have noted is that, when typing the URL manually in to the browser, the IP address is changed to the computer name, e.g., "computer.local/~user", whereas when the link in System Preferences is used the URL uses the IP address, e.g., "192.168.0.10/~user". Any thoughts?
I bet when you type in the URL, you don't include the trailing slash, just like you've typed it here. If you don't include the trailing slash, your Apache will basically "redirect" back to itself and include the trailing slash. It appears that if you haven't set up a server name in your Apache config file, then it must "redirect" back to the Bonjour name (the ".local" one).
When you click on the link in the Sys Prefs, they've included the slash, so the "redirect" doesn't happen, hence the IP address stays.
charlie -
Has anyone set up a chat environment using web sharing - I have downloaded a version of MYSQL and a PHP chat tool, but hesitate to begin a configuration before asking if anyone's accomplished this. We need a chat tool for a short, (3 day) two sided meeting. We'd like to comment to one another using discrete messages sent back and forth rather than whispering and passing notes. Any help is greatly appreciated. We are using an Airport Express for our lan, not connected to W3.
G4 17 Mac OS X (10.4.7)
G4 17 Mac OS X (10.4.7)I have GoDaddy hosted domain name which I have setup to forward all web traffic to my ISP provided web page (eg http://my.webpage.ISP.com/account-name).
There is nothing magical about that URL. So I do not see any reason why you can not use your DynDNS.org name. -
Hi Guys
My apache server saying that i want to run on windows
"PORT MUST BE IN NUMERIC"
OCP DBA
[email protected]By default, when you install Web Cache and Apache from Oracle installer, Web Cache listens on 7777 and Apache
listens on 7778. Make sure that there is no port conflict. -
Web Services with Apache Axis plugin Weblogic
Hi,
I am a newbie to Web Services & Apache Axis. I have plugged in Apache Axis with
Weblogic 6.1. I wanted to know whether an architecture of the following is possible.
Web Services published on Apache Axis wrapped on SessionBeans on Weblogic 6.1.
Also can I get some docs, samples that can help me.
Any help is appreciated.
MeghnaHi Meghna,
hmmm...if you are going to start off with webservices, why not go with
the very best available: WLS 8.1 has:
- much better schema coverage,
- rpc, doc-literal and doc-literal-wrapped style
- async client
- jms transport
- security and RM
- many new ant tasks
See the full list: http://edocs.bea.com/wls/docs81/webservices.html
All the features...plus outstanding performance and our award winning
support.
Bruce
Meghna Sinha wrote:
>
Hi,
I am a newbie to Web Services & Apache Axis. I have plugged in Apache Axis with
Weblogic 6.1. I wanted to know whether an architecture of the following is possible.
Web Services published on Apache Axis wrapped on SessionBeans on Weblogic 6.1.
Also can I get some docs, samples that can help me.
Any help is appreciated.
Meghna -
Web services with Apache plugin
Hi!
I am setting up a weblogic 8.1 env. were I have Apache as HTTP server working as proxy for external (outside the company) calls. Is it going to work out-of-the-box for Web Services as well or is there anything I need to think about?
Thx,
IggyHi Meghna,
hmmm...if you are going to start off with webservices, why not go with
the very best available: WLS 8.1 has:
- much better schema coverage,
- rpc, doc-literal and doc-literal-wrapped style
- async client
- jms transport
- security and RM
- many new ant tasks
See the full list: http://edocs.bea.com/wls/docs81/webservices.html
All the features...plus outstanding performance and our award winning
support.
Bruce
Meghna Sinha wrote:
>
Hi,
I am a newbie to Web Services & Apache Axis. I have plugged in Apache Axis with
Weblogic 6.1. I wanted to know whether an architecture of the following is possible.
Web Services published on Apache Axis wrapped on SessionBeans on Weblogic 6.1.
Also can I get some docs, samples that can help me.
Any help is appreciated.
Meghna -
Personal Web Sharing - Error 403 - Forbidden
Works on all the users except mine.
I can view the Apache manual but anything in Sites does not come up - Error 403 - Forbidden...
Suggestions?403 is a permissions error. Typically this means that Apache doesn't have permission to read the directory that contains your content.
You need to check your ~/Sites directory (as well as your home directory and all the directories in the path) to make sure they're readable by Apache. -
Newbye question on web sharing
Hello,
I have an Airport Extreme station, linked to the internet with a fix IP address, and a local Wifi network in my house. Adresses in the local network are 10.0.1.1 10.0.1.2 etc. All machines inside my house are macs.
On mac 10.0.1.2 I have put web sharing with Apache server running it.
Inside the local network, I can accesss it with http://10.0.1.2/~twohorned/, it works well.
But how to access it outside my local network ? I tried http://my-fix-ip/10.0.1.2/~twohorned/ but that does not work.
Thanks !Hi
You need to use port forwarding on the Airport (if that's your network router) to point any web visitors from the outside world to your 10.0.1.2 machine. Configure your Airport using the Airport Utility, go into Manual Setup, and set up forwarding as follows:
your public IP / port 80 --> 10.0.1.2 / port 80
and save/update the settings on the Airport.
Outside visitors can now access your site at:
http://your-public-IP/~twohorned
(Note that you may not be able to access that address yourself from inside your network.)
Matt
Maybe you are looking for
-
My brother and I have shared an account for five years, and now that I'm moving out, I want to create my own separate account but still want to be able to play the music I've purchased over five years.
-
Two Line Heading in ALV?
Dear All, I have created ALV Grid Report. Which having Colunms - <b>Material, Description, Showroom(Plan-A), Showroom(Plan-B),</b> Now user had requirend that The 'Plan-A', 'Plan-B' Come under heading 'Showroom'... how to do this... regards.
-
Can you share alert and ring tones from iTunes between iPad and iPhone
Can you share alert and ring tones from iTunes between iPad and iPhone like you can music and movies?
-
Cross Platform Organization App?
Throughout the day I sometimes come across things that I want to remember for later such as websites, thoughts, pictures, etc. I'm looking for a way to put these things in one place that I can access from a windows machine at work, my mac at home, an
-
Hi all, I would really appeciate some intervention by the mods Ive been having problems for quite some time now, my bb runs smoothly for a few weeks then i get a noise on my line and the IP profile drops to 135, im connected to the master socket and