1

I run a server with Ubuntu and Apache 2.4.7 and for debugging I run locally XAMPP Version 5.6.19.

For the first time I noticed a difference in the page I'm developing. On the XAMPP Apache works everything as desired. On the Ubuntu server there is one issue: the Apache doesn't load one of two .css files. Everything is the SAME(folder structure, files etc..).

The .css files are stored in /var/www/html/css/ on the ubuntu server and the /var/www/html/index.html file include both .css files via this two instructions located in the head of the html file:

    <link rel="stylesheet" href="css/style.css" type="text/css"/>
    <link rel="stylesheet" href="css/modalCustomization.css" type="text/css"/>

The file /var/www/html/css/style.css will be loaded correctly. The file /var/www/html/css/modalCustomization.css will not be loaded.

Any suggestions why the Apache on the ubuntu server is doing/not doing that?

1
  • 1
    What happens if you put the modalCustomization entry above the main one? Apr 14, 2016 at 12:51

3 Answers 3

0

I just found a solution from another question. Everything works if I add a ./ before the path in index.html.

<link rel="stylesheet" href="./css/style.css" type="text/css"/>
<link rel="stylesheet" href="./css/modalCustomization.css" type="text/css"/>
0

You'll need mod_mime, and ensure you have these lines in your httpd.conf:

AddType text/css .css
AddType text/javascript .js

That should do it.source

EDIT

Make sure that this line is not commented

IncludeOptional conf-enabled/*.conf

and the mine.conf and the load exists and the file

/etc/mime.types is exist

1
  • not working for me
    – shorif2000
    Jan 19, 2018 at 10:46
0

Faced the same problem as yours, noticed that your 1st css uses lowercase and the 2nd propercase.

Was using "StyleSheet.css" but when I renamed as "styles.css" it suddenly works! Running XAMPP on Windows 10.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .