Joomla Multilanguage: Images not be load - apache

I set up my Joomla 3.x on a apache2 server. The files are located in the root folder of the apache(/var/www). Everything works fine, but know since i set up it with multilanguage support some of the images can't be load.
An url example of my page: http://www.example.com/en/widgetkit/slideshow
For example the button.png from the Widgetkit Slideshow:
Some of the images are defined in the slideshow itself(something like images/widgetkit/..../img.png). Joomla loads the image only when i change it to /images/widgetkit/..../img.png. That is because i pointed to the root of my apache.
My question now, is there a better solution to solve this problem, then put in all imagelinks(maybe files too) the / before?
Note: Some few images were load, but some not.

try to use "base href" in the head section in the file index.php in the template directory
<base href="http://www.example.com">

Related

nginx conf express and assets returning 404

Have been at this all day and so far not getting to where I'd a liked to have been.
Running pretty much the latest version of everything as just building a new server to move off IIS/IISNode.
I have nginx installed and some conf going that serves only my main index file from a sub dir of /vra/www/. However it does not load any assets or sub-dir pages.
If I call the assets directly, using lowercase URL it returns 404 but uppercase URLs where needed work fine.
My conf example can be seen here: pastebin.com/a12TqP6w
What all think in the webroot folder. I think it has only one directory html your codes are put in the html directory there is no stuff in the mentioned directory /var/www/dev.fishpal.com. change your configuration accordingly where is web content is placed.
Replace with this one.
root /var/www/dev.fishpal.com/html;
or put your codes and stuff in the following directory.
root /var/www/dev.fishpal.com;
Needed to drop some extra things I had inside my conf file

PrestaShop images not showing when friendly-URL is switched on

After an installing a new SSL certificate and changing the PHP version from 5.x to 7.1.28 product images are not shown in the frontend anymore, Chrome dev tools show a 404 error for the image files.
They are visible in the backend under product catalog.
It looks like if the image directory is missing, i.e. something like /home-default/ because in the HTML code the image file is supposed to be directly on the document root directory, which obviously is wrong.
When I switch off "Friendly URL" the images are shown.
What I tried so far:
Deleted .htaccess, switched Friendly URL to on to regenerate the .htaccess
Emptied cache and regenerated the image thumbnails
Switched back to PHP 5.4
Added AllowOverride All to the vhost config
Nothing helps. On the server is another PrestaShop installation, running same PrestaShop version 1.6.18 also under PHP 7.1.28, there the "Friendly URL" works fine.
I must say I have no clue where to look after this problem.
After spending some time with #Harry, debugging his configuration, we found the solution and I'm sure this will help many others.
#Harry was using a combo with Nginx + Apache.
We checked his PrestaShop .htaccess file and made sure RewriteEngine was on and triggered properly (e.g. the pages were properly rewrited, only the images were not) - everything was OK.
We tried to write ourselves a basic RewriteRule to redirect a .jpg and it did not work, showing an Nginx 404 page.
We came to the conclusion Nginx was handling all the static content (JS, CSS, JPEG, etc.) and not forwarding it to Apache.
Solution
We removed this part from the Nginx configuration:
location ~ ^/(.*\.(ac3|avi|bmp|bz2|cue|dat|doc|docx|dts|eot|exe|flv|gz|htm|html|img|iso|jpeg|mkv|mp3|mp4|mpeg|mpg|ogg|ppt|pptx|qt|rar|rm|swf|tar|tgz|ttf|txt|wav|xls|xlsx|zip))$ {
try_files $uri #fallback;
}
As a general advice, I would suggest not using Apache+Nginx, PrestaShop works very well with Nginx+PHP-FPM already and you will get great performances.
If you choose this solution, don't forget to set your PrestaShop rewrite rules directly in Nginx (Example).

Previewing files on web server?

I am currently browsing the files (mostly images) on our server using HTTP, in the most primitive way (a very inefficient way).
To quickly glance a file, I need to click on and open it. Then exit, onto the next file. Very inefficient.
Is there a way that I can preview these files without opening them, just like what we do on our Mac/Windows system.
You could use Fancybox to get both a thumbnail view, and to open images without leaving the page. You can configure Apache to display your directory as a gallery, and add in thumbnails of your image into the DOM.
Try the instructions found here. The demo on that page doesn't seem to be working, but the instructions do work. The instructions there don't cover adding thumbnails, but in my abbreviated instructions below I added in a step to get them:
Download Fancybox
Create a fancybox directory at the root level of your site, and add the files from the Fancybox download.
Create a fancybox.html file in the fancybox directory and load the Fancybox library and set the config options. See the example here.
(My addition) Add a line to fancybox.html to insert a thumbnail into the Apache directory listing. Here's just a simple line you might add after line 26 in the linked example file:
$(this).html("<img src='"+ $(this).attr('href') +"' width='200'>" + title);
Create a .htaccess file in your image directory (and be sure .htaccess files are usable by Apache)
Add these lines to the .htaccess file:
Options +Indexes
ReadmeName /fancybox/fancybox.html
Navigate to your image directory
You can modify the Apache directory listing page to make it as pretty as you like. See this article on styling the directory listing. Probably any other gallery library you like could be used with a similar method, the important thing is that the ReadmeName option lets you inject javascript and css which you can use to manipulate the DOM.

Website not loading on LAMP but test page displays

I have set up my LAMP server on Ubuntu 14.04. I have created a virtual machine to host a website. The directory structure is:
var/www/DS/public_html
I have set up my configuration files so that the server responds to the url:
http://ds.local
I have created test pages inside public_html called index.html and index.php. I have modified the configurations so that index.php is the default page that gets served. In the test page named index.php, the only line of code is:
<?php phpinfo(); ?>
when I go to http://ds.local frrom my browser, the page gets served up and I can see all my php configurations. So. everything good till now.
I have a website which I had developed on WAMP. Now, when I try transferring the files of this website into public_html and try reloading the browser, nothing happens. I have looked at the developer tools window, and I am certain that no page loads.
I have ensured that I have copied all the files and folders making up the website, including all the folders containing js and css. I have also ensured that there exists a file called index.php
Where am I going wrong?
I have a website which I had developed on WAMP
Are you sure that all files are referenced by correct case?
Windows file systems are by default case-insensitive.
http://localhost/DS and http://localhost/ds
are same on windows but not on linux/unix.

Joomla Site move Sef problems

i am trying to figure this out for a couple of hours.
I am in the process of upgrading my joomla site from 1.5 to 2.5
I did all the work needed in an offline copy, i uploaded my new joomla site in a sub folder of root in "/v2" folder.
With my Joomla SEF links on i can't even use my template (blank page with post texts).
They work if i remove them but then i have other problems with Virtumart Search.
I already changed paths in configuration.php (cache,logs) and edited my .htaccess in my subfolder to have
"RewriteBase /v2".
The odd is that if i enable the default template is working.
I am really furstrated here, thanks in advance.
Try setting the base url in the configuration.php file