R
R
Roman Makarov2016-02-22 02:29:08
Apache HTTP Server
Roman Makarov, 2016-02-22 02:29:08

Why can't apache see the virtual host?

fedora 23/apache 2.4.18
What I did: I
created a config file example.conf with the following content:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/var/www/exampleSite"
    ServerName example.com
    ServerAlias example.com
    DirectoryIndex web/index.php
    ErrorLog "/var/log/httpd/example-error_log"
    CustomLog "/var/log/httpd/example-access_log" 
</VirtualHost>

put it in conf.d
Posted in localhost
127.0.0.1 example.com
But when I go to example.com, the standard Apache welcome page appears, what did I miss?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kirill Arutyunov, 2016-02-22
@rmakarov

The index.php file must be in document_root. This is the entry point to the application. In the same folder are pictures and other statics.
So it's more correct to define web as document_root.
The second option is to use a symbolic link.
Set document_root to some public_html folder and point to a symbolic link to web.
But if you have access to the server configs, then the second option looks a little strange.

A
Alexander Sydorenko, 2014-11-12
@San40

And so?

var currStamp = new Date().getTime();
var from1970 = (currStamp / (1000 * 60 * 60));
document.write(Math.round(from1970));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question