Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • That gives me a 500 error. Which is basically a php error. I messed around with the syntax which didnt work and then i did <img src="{{ asset('icons/weather/cloud.svg') }}" /> which shows <img src="/icons/weather/cloud.svg"> in inspect but i still get my 404 error. :/
    – GiantJelly
    Commented Aug 3, 2016 at 11:08
  • And the icons folder is it directly under your web root folder? I'm thinking you get the 404 error because of the path, which probably should be icons/weather/cloud.svg. Try entering that URL directly in your browser to see that you can actually grab the file. If you don't have access to a browser, try curl or wget commands (from command line). You need to understand why the 404 error - because that also could be a permissions error (it's possible).
    – Alvin Bunk
    Commented Aug 3, 2016 at 14:40
  • I have tried searching the url {address}/icons/weather/cloud.svg on my ubuntu server and i get a "Not found" page. I then search the exact same thing on my windows server and it loads the .svg to me. Ive ran chmod across the whole www folder to rule out permissions. I still have no idea what this could be, Could symfony use a folder called "icons" and get confused or something? The icons are at www/web/icons/weather/cloud.svg
    – GiantJelly
    Commented Aug 6, 2016 at 10:34
  • Is "www" your Symfony project name? If so, that's probably the problem. The "web" folder under that folder is the one you need to use as the web folder config on your server. If it is ubuntu, it is probably "/var/www/html/www/web" that you would specify in your Apache DocumentRoot directive.
    – Alvin Bunk
    Commented Aug 7, 2016 at 0:12
  • Hey Alvin. Its resolved now as you can see in my answer below. The document root is /var/www/project/web i removed the html directory form document root as I wanted a clearer directory list. Thank you for all your help
    – GiantJelly
    Commented Aug 8, 2016 at 11:04