I have that tiny script :
<script>
$( document ).ready(function() {
$('button').on('click', function(event, state) {
var path = $(this).data("path");
console.log(path);
$.ajax({
type:"GET",
url: path,
dataType: 'text',
contentType: 'text',
async: true,
success: function (data) {
$("#file-content").text(data);
}
});
});
});
</script>
and HTML part is :
<button type="button" class="btn btn-primary" data-path="/error_log">error_log</button>
<button type="button" class="btn btn-primary" data-path="/log.txt">log.txt</button>
<div id="file-content" style="white-space: pre-line;"></div>
That code works perfectly on my Macbook, running apache locally. But once uploaded on my server, the loading of /log.txt works perfectly BUT loading error_log file returns 403 error. I checked permissions on those files and they are exactly the same permissions :
-rw-r--r--. 1 XXXXXXXXX XXXXXXXXX 1000 14 aoû 23:00 error_log
-rw-r--r--. 1 XXXXXXXXX XXXXXXXXX 6032 16 aoû 09:55 log.txt
I can't figure out the problem. Could you help me please ??
Best regards,
T.