as admin, when trying to edit product description, using TinyMCE to insert an image -
when trying to save the new description I get server error.
I followed recommendation from - https://www.prestashop.com/forums/topic/317986-after-upgrade-to-16-i-cant-add-images-in-the-editor-i-get-a-litle-square-with-a-black-x-black/
and I removed \img\cms.htacces
and indeed the problem was solved and now I can save product description with image.
but according to - https://www.prestashop.com/forums/topic/316255-cms-images-cant-be-displayed-unless-htaccess-file-is-deleted/
I now have a security problem.
so what should be .htaccess content? or is there another solution for TinyMCE problem?
my \img\cms.htacces file:
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
deny from all
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png)$">
order deny,allow
allow from all
</Files>
Can you try with this file?
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
Require all denied
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png)$">
Require all granted
</Files>
Since Apache 2.4 mod_access_compat has been replaced by mod_authz_host.
Here is an upgrading documentation
Related
I have an environment with Oracle WebLogic and OHS running.
In the mod_wl_ohs.conf I have following (beside config for other applications)
<Location /application1>
SetHandler weblogic-handler
WLLogFile /opt/logs/ application1.log
Debug OFF
WebLogicHost 127.0.0.1
WebLogicPort 23666
</Location>
This works fine the and the server listening to 23666 with the actual application1 application is handling the requests like “http://example.com/application1/*” .
Now I would like to redirect all requests for specific URL pattern to a different domain (not necessary on the same server), but continuing handling all requests others.
Redirect: http://example.com/application1/MagicKeyword/*
continue on: http://example.com/application1/NotTheKeyword* or http://example.com/application1/AlsoNotKeyword/*
What is the right approach for that?
I played around with some mod_rewrite rules, it seems they don’t take affect or break everything (in httpd.conf). I was also reading that we should not use mod_rewrite rules inside of location tag (can't find the reference now).
What else can I do?
Edit: So finally I found my error (somehow wrong syntax which not prevented the server from starting (like usual).
So I could:
in httpd.conf
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule "(.*)/application1/MagicKeyword/(.*)$" "https://www.example.org" [NC,L,R=301]
</IfModule>
or in the Location tag add:
RewriteEngine On
RewriteRule "(.*)/MagicKeyword/(.*)$" "https://www.example.org" [NC,L,R=301]
Why should I prefer one over the other?
Is there anything to concern about?
Two other options you can consider. You can use the order of location tags:
<Location /application1/MagicKeyword>
WebLogicHost otherhost
</Location>
<Location /application1>
WebLogicHost 127.0.0.1
</Location>
You can tell WebLogic to exclude a path (see https://docs.oracle.com/middleware/1212/webtier/PLGWL/plugin_params.htm#PLGWL473):
<Location /application1>
WebLogicHost 127.0.0.1
WLExcludePathOrMimeType /application1/MagicKeyword
</Location>
<Location /application1>
WebLogicHost otherhost
</Location>
I wanted to set up a mail server on my vServer hosted by Strato. The installation process seemed to easy, so I just installed the package via Plesk 12 updater.. I expected it to be "ready-to-use" but all I have got is a 403 - Forbidden when I try to access the webmail on my vServer (ubuntu 14.04 / webmail.mydomain.com)
Most of the sources I have found doesn't cover my problem at all. And if there were similiar problems, they installed roundcube manually over the console. I could try to fix it over the console, too, but I don't want to mess up the automatically installed version of roundcube.
I mean, it seems to be there. I just don't have access to it. Any ideas?
1- Make sure your roundcube is found/moved in /var/www/ path.
2- Modify your apache config file in "let say" /etc/apache2/conf.d/Example.conf and use these configuration while editing paths for your roundcubemail depending on your current roundcube default configuration:
Alias /roundcube /var/www/roundcube/roundcubemail-0.3.1
< Directory /var/www/roundcube/roundcubemail-0.3.1 >
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
< IfModule mod_php4.c >
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
< /IfModule >
< IfModule mod_php5.c >
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
< /IfModule >
< /Directory>
3- If you encounter any php compatibility make sure to edit check.php in the installer folder and this will work for u.
I am trying to run my first Perl Catalyst application using Apache and fastcgi.
Starting the server is fine, I can see the application's main page. All images/javascripts are loaded correctly (so, I assume the static content is served correctly).
For reasons I don't understand the dynamic content gives me a 404: e.g. when trying to go to www.webapp.org/search, I get "The requested URL /search was not found on this server."
Ok, here is how I set the aliases for the static content and
Alias /static /webapp/root/static/
Alias / /webapp/script/webapp_fastcgi.pl
I set the documentroot with
DocumentRoot /webapp/
Furthermore, I have a
<Location />
Options +ExecCGI
Order allow,deny
Allow from all
AddHandler fcgid-script .pl
</Location>
and a directive
<Files /webapp/script/webapp_fastcgi.pl>
PassEnv PERL5LIB
SetHandler fastcgi-script
</Files>
There is nothing else in the config file.
How can I add a directive to allow serving dynamic content (www.webapp.com/search)?
Thanks a lot in advance!
I see a space in AddHandler section. Please check your config file for typo's.
AddHandler fcgid-script .pl
Also please read this if you not did it already:
http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi
For development work you could use catalyst without apache hassle: http://search.cpan.org/~mramberg/Catalyst-Runtime-5.80012/lib/Catalyst/Engine/FastCGI.pm#Standalone_FastCGI_Server
Assuming apxs installed mod_fastcgi.so into /usr/local/apache/libexec, add the following to an Apache .conf file:
LoadModule fastcgi_module libexec/mod_fastcgi.so
<IfModule mod_fastcgi.c>
FastCgiExternalServer /tmp/myapp.fcgi -host myhost:8081
Alias /myapp/ /tmp/myapp.fcgi/
</IfModule>
Im using openfire for the xmpp to my website. I have done a server move and relocated the site on the same server as openfire as they were both on different servers before.
Since the move im getting error 500 on the /http-bind/ request on my website.
How can i debug this or what to i need to consider that may be causing the error 500 on /http-bind/
Error log
[warn] proxy: No protocol handler was valid for the URL /http-bind/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
Short answer: You need to load the 'proxy_http' module in Apache.
There are some instructions I wrote in the Prosody documentation on setting up BOSH with Apache, but they should apply equally to any BOSH/XMPP server. In particular I'm not sure whether Openfire is fussy about /http-bind vs. /http-bind/. Therefore if the below instructions do not work, try adding the / to the end of the URL.
Summary
Run: sudo a2enmod rewrite proxy proxy_http
Add the following lines to your Apache config:
<Location /http-bind>
Order allow,deny
Allow from all
</Location>
RewriteEngine On
RewriteRule ^/http-bind$ http://example.com:5280/http-bind [P,L]
I would like to add that with a properly configured server you can just put this in your .htaccess in the root of your web folder:
<IfModule mod_rewrite.c>
RewriteEngine On
# Rule1
RewriteCond %{REQUEST_URI} ^/chat1/http-bind
RewriteRule ^.*$ http://chatsrv1.joynmenow.com:7070/http-bind/ [P,L]
# Rule 2
RewriteCond %{REQUEST_URI} ^/chat2/http-bind
RewriteRule ^.*$ http://chatsrv2.joynmenow.com:7070/http-bind/ [P,L]
</IfModule>
I'm not exactly sure what configs are required to allow this in a .htaccess however my godaddy VPS allowed me to do this in it's default configuration.
I have a really strange behavior while using Mason, for example:
I have an index.html file ( that contains mason tags like <% $var %> hello ).
When I'm browsing to http://bla.com/index.html the variable is translated during compilation.
But there's a strange behavior when I'm browsing to http://bla.com/index.
Though there's no file called index (only index.html) it still loads index.html and the entire code is shown as plain/text including the <% ... %> !!!
What have I configured wrong ?
this is my Apache configuration:
<VirtualHost *:80>
ServerAdmin webmaster#abc.com
ServerAlias abc.com www.abc.com
ServerName abc.com
DocumentRoot /var/www/abc.com
DirectoryIndex index.html
<Directory "/var/www/abc.com/">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
SetHandler perl-script
PerlModule HTML::Mason::ApacheHandler
PerlSetVar MasonUseObjectFiles 1
<LocationMatch "(\.html|\.txt|\.pl|\.js)$">
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</LocationMatch>
<LocationMatch "(\.m(html|txt|pl)|dhandler|autohandler)$">
SetHandler perl-script
PerlHandler Apache::Constants::NOT_FOUND
</LocationMatch>
After a ~year I accidently found the answer, so I wanted to share my findings:
The problem was that Mason(Perl) displaying the code itself of another file on the web instead of providing "404 file not found" and I had no idea how to stop it. e.g: when requesting index it shows the code of index.html
The solution is that in my Apache configuration there was the following:
<Directory "/var/www/my_dir/">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Apparently "MultiViews" is activated through mod_negotiation.c, which cause the site to search for a pattern of the next-best match in-case the file is not found on the server. ( so from www.site.com/index it found index.html )
But because there's no configuration in the Apache to execute /index in Mason ENV ( no file extension ) , it simply displayed the code ...
Funny :) but the solution was to change "Options FollowSymLinks MultiViews" to "Options FollowSymLinks -MultiViews" and not using the MultiViews.
Found this solution while seen the following response headers:
Content-Location index.html
Vary negotiate
The "MultiViews" doesn't have any meaning to me, as it was a copy-paste from a 5 years ago that I simply carried from one web-server to another :)
Thanks,
Ricky.
Why the webserver automagically
translates index into index.html
still insists on treat it specially (it apparently don't feed it into the PerlHandler as it should) I honestly don't know (perhaps the answer is elsewhere in your configuration).
However, you could as a work around try to add 'index' (or perhaps rather'^index') to the regex that defined what files should be dispached to HTML::Mason::ApacheHandler. I do admit it is a bit ugly though.
Am I correct that once you load the index page and get that verbatim code displayed, once you check out the page info, the encoding is literally plain/text? Perhaps you need to configure some mime settings to ensure that files without suffixes (files not ending with .html etc) are not sent to the remote browser at all, not even as plain/text?