Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by madguru

Hi,

I'm new to setting up server etc. I have spent a good 6 hours with no luck in the end.

http://localhost/ displays It works!

http://localhost/impact/ displays not found.

http://localhost/impact/weltmeister.html displays not found.

Safari/Develop/Show Error Console shows now errors when trying to load these pages.

Mac OSX Snow Leopard

Installed mysql

Web Sharing Enabled

http.conf:
PHP line uncommented
Username modified
Server Name uncommented and set to: ServerName www.impact.local:80

<user>.conf set to:
<Directory "/Users/adnanmg/Sites/*">
Options Indexes MultiViews
</Directory>

/etc/hosts added line:
127.0.0.1 impact.local

/etc/apache2/extra/httpd-vhosts.conf:

removed other hosts and added:

<VirtualHost *:80>
DocumentRoot /Library/WebServer/Documents
ServerName localhost
</VirtualHost>

<VirtualHost *.80>
DocumentRoot "/Users/<username>/Sites/impact/"
ServerName impact.local
</VirtualHost>


I have made sure to run: sudo apachectl restart
after each change, and got to the point where console does not show any more errors.

After 4 hours of reading websites and trying things, I am still not closer to making it work. Any suggestions would be really appreciated. Thanks!

Adnan

1 decade ago by stahlmanDesign

Make sure your permissions are read and write on all your impact folders and files. Sometimes they get set to read-only.

1 decade ago by madguru

Thanks for the replay stahlmanDesign. The folders are writeable, but when I go to:

http://localhost/impact/weltmeister.html

I get Not Found. I can double click the file in the folder and it opens up as file://...

So, I am unable to go to subdirectories from localhost. Could this mean that localhost is not pointing to the correct location somehow?

1 decade ago by cold_geek

It looks like you're off by one on the folder structure, since:
http://localhost/ displays It works!

It seems like you've left the impact folder out of the path... so to get to weltmeister use:

http://localhost/weltmeister.html

hope this helps

1 decade ago by madguru

Thanks Cold Geek, I tried this but still no luck. It still says Not Found when I enter http://localhost/weltmeister.html

I even tried copying the files in the impact folder so that they are directly under the WebServer folder, but it still says not found.

So, my question then, is how do I see what folder localhost refers to. Is it supposed to be WebServer? I think that might be where the problem is.

Is there a step I missed where localhost is designated as WebServer?

1 decade ago by alexandre

The way I validated my setup on OSX Snow Leopard was:

1. enable Web Sharing

2. copy the Drop project to ~/Sites, i.e.,
~/Sites/drop
~/Sites/drop/index.html
~/Sites/drop/lib/
~/Sites/drop/lib/drop.js
~/Sites/drop/lib/impact/
etc.

3. change permissions to rw all on all drop folders

4. in Chrome, go to http://localhost/~alex/drop

And it worked. Perhaps inserting your home dir (e.g., ~madguru) after "localhost/" will fix it.

1 decade ago by madguru

Thanks for the reply Alexandre. I followed your instructions, but still now luck.

when I try http://localhost/~username/

I get:

Forbidden

You don't have permission to access /~username/ on this server.

I guess this is some progress, as it admits that this location exists. Any ideas? I set the folders to read and write by everyone, rebooted my computer and tried and still now luck.

1 decade ago by cold_geek

Hey madguru,

Seems like we may have you confusing the two locations on your mac that are used for Web sharing.

There's your "personal" web site location and the "computer's" web site location.

To see where they each are, you can go back into the "Settings", choose "Sharing", select, "Web Sharing" and make sure it's turned on.

You may need to wait a little.

Then you'll see two links and a button for each, something like:
"
http://192.168.1.1/~cold_geek/
< Open Personal Website Folder... >

http://192.168.1.1/
< Open Computer Website Folder... >
"

Of course the actual address, and the actual username will be different on your system.

Click on each of those buttons and see where the files are.

You'll see that you have the index.html for impact in the 'Computer Website' location (That's why you got the "It works!" from http://localhost/ )

You'll probably also find that the "Personal Website Folder" points to ~/Sites/

Its the "Personal Website Folder" that is giving you the "Forbidden" reply, so:
Whatever that address points too, there's something wrong with that folder/location. Does everyone have read access? Is there an index.html file there? Any files? If you "Get Info" on that folder, does it show you as the owner?

So, regardless of what's going on with the Sites folder... do make sure you're looking at the right folder structure. You really only need to get one of them working, but I think I would have a preference for working in the Personal Website Folder.

1 decade ago by madguru

Thanks for the reply cold geek. This helps me understand how things are structured a bit better, but I still get forbidden when I try to go to my local site.

All folders have permissions for read and write set for all. I can't change permissions on the username folder, but everything below it is set to be read and written.

I know I am missing something, but I get the forbidden error when I go to the local site. Any ideas?

1 decade ago by madguru

Got it at last! Thanks to everyone for their help. Each suggestion got me that much closer. I really appreciate the time and care all of you put in to help me.

It was down to that last issue, so I did another search and found this solution:

Open a Terminal and $ sudo nano /private/etc/apache2/httpd.conf ;
ctrl+w (where is) : “<Directory />” ;
Alter the line below from “Deny from all” to “Allow from all“;
ctrl+x and y to save;
now $ sudo httpd -k restart to restart your Apache 2 server;
Now retry accessing http://localhost/~username on your browser – that should do it;

originally from this link:
http://techtrouts.com/mac-os-x-105-web-sharing-forbidden-403-on-httplocalhostusername/

Thanks again. Hope this helps others too.

1 decade ago by acainion

Hey I am having the same issue. I'm trying to read the last instruction but it's not very understandable, plus the link doesn't work. What is the command to "Allow from all"???

1 decade ago by acainion

Also, I'm working with Mountain Lion os

1 decade ago by matthewjames

I just do not understand, why do you guys not install MAMP? It is an installer that installs and will setup everything automatically.

Comes with: Apacher, PHP, FTP, MySQL and others.
http://www.mamp.info/en/index.html
Page 1 of 1
« first « previous next › last »