Recently, my localhost apache server stopped showing my index.html. It just shows "It works!" now. I'm not sure what to do. My httpd.conf file looks fine, but this is it:
http://pastebin.com/JQSEMUTy
and when I attempt to restart my apache server it gives:
httpd: Could not reliably determine the server's fully qualified domain name, using Richard-Lus-MacBook-Pro.local for ServerName
Thanks in advance!
I guess there was an update..?
DocumentRoot "/sites"
is this the document root you are using? If not, fix it. Also, set your servername:
ServerName www.example.com:80
Related
I have set up my OVH server, installing apache2, php5, mysql, phpmyadmin etc... And configured the vhosts.
The content of my VirtualHost file :
<VirtualHost *:80>
ServerName www.abracadabook.fr
ServerAlias abracadabook.fr *.abracadabook.fr
DocumentRoot /home/abracadabook/www/
<Directory /home/abracadabook/www/>
Options -Indexes
AllowOverride All
</Directory>
</VirtualHost>
When I type the ip address of my server, it displays the apache default page. But after setting up my windows hosts file (I'm on windows but the server's on linux), when I try accessing abracadabook.fr the site is loaded and the root directory is right (/home/abracadabook/www) and it displays the normal index of my website. But the problem is that the site is not accessible from another client machine.
When I try to access to it from a PC which host file is not set up, nothing will load even when I access it with the ip address.
I searched in many boards and forum but never found the solution.
I hope you can help me.
Regardly,
(PS Sorry for my bad english)
Turns out I had not the good informations.
I followed this tutorial step by step and it works well now.
Kimsufi DNS setting Tutorial (French)
I am a beginner to Apache and have been trying to create virtual hosts but I come across a very odd issue. When the site is requested using the IP defined in the configuration, the virtual host works perfectly but when the name of the server is used it does not work.
Here is the configuration file which is an included file:
Listen 80
NameVirtualHost 192.168.1.5
<VirtualHost 192.168.1.5>
ServerName host1.localhost
DocumentRoot "C:/Program Files (x86)/Apache Group/Apache2/virtualHost1"
</VirtualHost>
In the browser I go to 192.168.1.5 and the index file for the Virtual Host appears but when I go to host1.localhost it doesn't work.
Any help is very appreciated, good day to all.
First you should try to see if your computer resolve host1.localhost hostname.
May be just try to ping it in your console: ping host1.localhost
If your computer is unable to resolve host1.localhost, as I suppose, then try to add it in your hosts file.
Hint: you'll find hosts file in C:\Windows\System32\drivers\etc directory
What do you mean by "it doesn't work".
1)Check your DNS settings, do you have record for host1.localhost pointing to 192.168.1.5?
2)Try using ServerAlias also
3)Check if there is another declaration for hosts1.localhost (by another ServerAlias)
I guess the most likely reason is 1)
So I'm trying to develop a php website locally on my macbook. I'm using apache as my webserver, I have php and mysql installed, and I can use the php index file in my sites folder, but I would like to move all of my development over to a different.
I've been trying to configure apache to run on a different port, so far I've made these changes to my /etc/apache2/extras/httpd-vhost.conf
<VirtualHost *:2727>
ServerAdmin foobar#gmail.com
DocumentRoot "/Users/brianWheeler/Foobar"
ServerName local.foobar.com
</VirtualHost>
And i've edited my /etc/apache2/httpd.conf to say
listen 127.0.0.1:2727 http
I've started apache, but when I go to 127.0.0.1:2727 I get the google chrome page not found type thing.
I've run apachectl -t command to see whats wrong, and I just get this one error
httpd: Could not reliably determine the server's fully qualified domain name, using Foo-Bars-MacBook.local for ServerName
So my questions are, how do I configure the DocumentRoot/index page, and what kind of diagnostics can I run to see why this won't work?
-Brian
httpd: Could not reliably determine the server's fully qualified domain name, using Foo-Bars-MacBook.local for ServerName - this error possibly is not related with your problem.
most of my test server are giving this error but they are running with no problem.
please try to insert the line without ip and http,
listen 2727
edit: can you try following:
NameVirtualHost *:2727
Listen 2727
I'm trying to install start apache2 on my own computer but get some problems:
so when I do:
sudo /usr/local/apache2/bin/apachectl start
it gives me:
httpd: Could not reliably determine the server's fully qualified domain name, using xxxs-MacBook-Pro.local for ServerName
httpd (pid 685) already running
and when Im trying to open "http://localhost/" it gives me 404. Is that because the default directory is wrong?
(I also tried to fix the the servername and in my httpd.conf it has #ServerName www.example.com:##Port##
and I changed it to ServerName localhost but doesn't work.)
I'm working on WampServer for development, I've set up the domain tuniguide.local It works fine with this configuration:
DocumentRoot "D:\www\tuniguide"
ServerName tuniguide.local
But when I wanted to add a subdomain fr.tuniguide.local I get a 404 Not Found with this configuration:
DocumentRoot "D:\www\tuniguide\fr"
ServerName fr.tuniguide.local
It gives me this message:
The requested URL /www/tuniguide/index.php was not found on this server.
Is there someting that I missed?
Thanks.
You may need to edit your host file on your server machine to have it point the correct domains to your localhost. Check out this in depth tutorial on subdomains for Wamp here: http://www.itutorblog.com/2011/06/how-to-create-a-subdomain-on-wamp/