Mac OSX : Localhost won't start anymore

kimmeeh

Registered
Hey guys and galls.

I don't have a Server. But i think i may have posted in the right spot. Not sure though.

I am a noob in this area. And gettin confused too. I would like to connect to localhost (127.0.0.1). I can't. I have been messing up my httpd.conf files i think. I tried to follow some tutorials.

Now i get the message "The requested URL / was not found on this server." after typing in my brwoseraddressbar "http://localhost/". Where should i start?

ANY tip is welcome. I am banging my head atm.

Edit: better make a new post
 
Last edited:
Just found out that the page to my website that runs locally is actually working: typing http://192.168.1.39/~kim/testsite/ gives me the result i want. However... And that was my original problem... clean urls does not work.

I have a htaccess file, containing this:
<Files .htaccess>
order allow,deny
deny from all
</Files>
php_value session.use_trans_sid 0
Options +Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteBase /~kim/testsite
RewriteRule ^contact* index.php?page=contact (and so on)

My website is here: http://localhost/~kim/testsite/
When i type: http://localhost/~kim/testsite/contact i get 404 The requested URL /~kim/testsite/contact was not found on this server.
When i type http://localhost/~kim/testsite/index.php?page=contact i get the page i expect and the page i want when typing http://localhost/~kim/testsite/contact

Any ideas?
 
VirtualHostX (http://clickontyler.com/virtualhostx/) solves all my problems (well, almost all) :)
I have everything running now. Got a wp website and a drupal website running. Very cool.

One problem though... i cannot login to eiher the drupal or the wp website. I cna browse them, no probs. So if anyone stumbles upon a reason for this, i am very interested :)
 
Yeah, Apache in the client version of OS X will only, by default, host web pages from the directory in your home folder, so it makes the URL function in that form. You could try modifying the configuration files for Apache manually from Terminal using either Vim, nano, or whichever text-based editor you prefer, and see if you can modify how the documents are accessed. As for not being able to access your WP and Drupal installations, make sure that the permissions for those directories (and the files within) are set properly. I know that CMS systems like Drupal, Joomla, and others require you to make sure certain permissions are set in place first before going live with the site.
 
Hey Nixgeek

Thanks for your reply. I do not understand the last part of your post however.

Are you suggesting hat i can browse the website but not log in to the admin section bcs of folder/file permissions?

Sounds weird to me (bcs i dont understand how it works). If i log into my computer as kim, i thought i should be able to access all files and folders that i created or moved to the computer right? I am the owner/administrator of it. I have root rights i assume? Or are the files 'executed' by another user? Does the webserver have another user/access rights? Anyway... I changed all the folders and files to 777 to check. It does not make a difference. (I only changed he drupal site, not the wp one but i guess that it's clear that permissions are not the issue in this case).

I can browse the website. It shows everything i expect. The only thing is that if i try to log in, and i click the 'OK' button after entering my details on the login page (local.site/user or localhost/~kim/testsite/user) nothing happens. I do not get a message if i enter incorrect data, i do not get redirected to user/1 if i enter correct data. I just stay on the login page. The browser address bar still shows local.site/user or localhost/~kim/testsite/user. Changing the url to there i expec to be directed after successful login is not possible: i get 'no rights', just as in the live version that works well.
 
Hey Nixgeek

Thanks for your reply. I do not understand the last part of your post however.

Are you suggesting hat i can browse the website but not log in to the admin section bcs of folder/file permissions?

Sounds weird to me (bcs i dont understand how it works). If i log into my computer as kim, i thought i should be able to access all files and folders that i created or moved to the computer right? I am the owner/administrator of it. I have root rights i assume? Or are the files 'executed' by another user? Does the webserver have another user/access rights? Anyway... I changed all the folders and files to 777 to check. It does not make a difference. (I only changed he drupal site, not the wp one but i guess that it's clear that permissions are not the issue in this case).

I can browse the website. It shows everything i expect. The only thing is that if i try to log in, and i click the 'OK' button after entering my details on the login page (local.site/user or localhost/~kim/testsite/user) nothing happens. I do not get a message if i enter incorrect data, i do not get redirected to user/1 if i enter correct data. I just stay on the login page. The browser address bar still shows local.site/user or localhost/~kim/testsite/user. Changing the url to there i expec to be directed after successful login is not possible: i get 'no rights', just as in the live version that works well.

Yes, depending on the permissions you have set within the folder that's holding either WP or Drupal. Mind you, I'm referring to when you're browsing the site from a web browser, not when you're using the Finder.

The web server usually has another user account that's used when someone browses the site, so it's possible that that user does not have permissions to view the section that's holding the administrator pages. I remember with Joomla, I had similar issues with the web server user account having problems due to permissions.
 
Mind you, I'm referring to when you're browsing the site from a web browser, not when you're using the Finder..

Me too. I can browse using a browser. If i do i see the same locally as i see on the live site. Which is what i want. The only thing i cannot do it log into the admin section. Which i can do on the live site. (The local site is a copy of the live site).
 
Back
Top