2
votes

I want to develop facebook app locally and was trying to follow instructions on

https://devcenter.heroku.com/articles/facebook#working-locally

I installed lamp on Linux Mint 13 and created /etc/apache2/conf/extra/httpd-vhosts.conf as below.

NameVirtualHost *:80

VirtualHost *:80>
     DocumentRoot "/home/ashish"
     ServerName localhost
 /VirtualHost>

VirtualHost *:80>
    DocumentRoot /home/ashish/savefromiad/blooming-stream-1211/
    ServerName mycoolapp-dev.localhost
    SetEnv FACEBOOK_APP_ID 461561000551920
    SetEnv FACEBOOK_SECRET 00000000000000000000000
/VirtualHost>

In my browser localhost works good, but trying to access mycoolapp-dev.localhost in browser fails.

"Oops! Google Chrome could not find mycoolapp-dev.localhost"

Any ideas?

I also get this error when I restarts apache

NameVirtualHost *:80 has no VirtualHosts

PS: Before all "VirtualHost" there is a "less then" sign.

2

2 Answers

3
votes

You also have to edit /etc/hosts file.

Add there something like

127.0.0.1 mycoolapp-dev.localhost

Also, double check your /etc/apache2/conf/extra/httpd-vhosts.conf i think you dont need two DocumentRoot and ServerName for one virtual host(as you pasted in your question)

1
votes

I got this.

I needed a separate entry in /etc/hosts as below.

127.0.0.1       localhost
127.0.0.1       mycoolapp-dev.localhost

Thanks icrew for pointing to /etc/hosts.

Also I commented out "NameVirtualHost *:80" in "/etc/apache2/ports.conf" as it was already there in "/etc/apache2/conf/extra/httpd-vhosts.conf".