This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

wrong path to css and images after installing

Discuss installing Symfony 2 here

wrong path to css and images after installing

by blueamerican » Thu Jan 02, 2014 11:51 am

hi,

after installing symfony 2.04 on xampp i get the following page:

localhost/web/app_dev.php

everythng works, but i get no css files and images

the path is:
<link href="/bundles/framework/css/structure.css" rel="stylesheet" type="text/css" media="all" />

what is wrong?

best regards
blueamerican
blueamerican
Junior Member
 
Posts: 2
Joined: Thu Jan 02, 2014 11:44 am

Re: wrong path to css and images after installing

by blueamerican » Fri Jan 03, 2014 3:29 pm

it works after reinstallation of xampp and symfony

thanks!
blueamerican
Junior Member
 
Posts: 2
Joined: Thu Jan 02, 2014 11:44 am

Re: wrong path to css and images after installing

by smugford » Sun Jan 05, 2014 10:59 am

you need to setup a virtual host in apache or nginx

http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html

Code: Select all
<VirtualHost *:80>
    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot /var/www/project/web
    <Directory /var/www/project/web>
        # enable the .htaccess rewrites
        AllowOverride All
        Order allow,deny
        Allow from All
    </Directory>

    ErrorLog /var/log/apache2/project_error.log
    CustomLog /var/log/apache2/project_access.log combined
</VirtualHost>


on windows you need to change them to c:\xampp\htdocs\project\web

or whatever the location of your project is.
User avatar
smugford
Faithful Member
 
Posts: 245
Joined: Sun Nov 29, 2009 8:32 pm