0

So, the problem seems simple, but I'm trying to solve it unfortunately without result. Apache still doesn't see a "/web" catalog (for example, I can't load css styles or images that exist there). Below is my httpd-vhosts.conf:

# Virtual Hosts
#

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot c:/wamp64/www
    <Directory  "c:/wamp64/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:\wamp64\www\projekt2\web"
    ServerName projekt2.dev
    ServerAlias projekt2.dev www.projekt2.dev
    Options Indexes FollowSymLinks

    <Directory "C:\wamp64\www\projekt2\web">
#        AllowOverride All
#        Order Allow,Deny
#        Allow from All

     Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
    Allow from all

</Directory>
</VirtualHost>

And hosts.conf in Windows's catalog:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
    127.0.0.1       localhost
#   ::1             localhost
    127.0.0.1   projekt2.dev
    ::1     projekt2.dev

Does anybody know, how to fix that? I would be so grateful.

1 Answers1

0

I just want to be sure - Which virtual host can't you see? The ServerName localhost or ServerName localhost?

I see that you are running Apache on Windows, so I am not sure if these command line switches will work because I use them for apache on linux.

/usr/local/apache2/bin/httpd -S

It will dump out a description of how Apache parsed the configuration files. Careful examination may help uncover configuration mistakes.

httpd -t
Runs a syntax tests for configuration files only.

Permissions could play a big part here too. Does the apache service (daemon) account have access to the location of the inaccessible files?

  • I see virtual hosts (localhost and projekt2.dev), I can switch between my php and twig files, but I can't load anything from document root in projekt2 (css styles, js, images). Where can I put those commands? In cmd.exe it doesn't work:) – Martini Nov 16 '16 at 09:15