Redis with Magento on different port (other than 80)
I'm quite new to Ubuntu (or at least the terminal and the directories) and
I've already encountered a problem on installing Redis on Magento. I'm
currently running Ubuntu x64 12.04 and I can't seem to get Redis to work
with Magento.
I've tested Magento on localhost using port 80 and Redis cache works fine.
The problem arises when I have to switch the TCP port from 80 to 8000
because my ISP actively blocks these ports to prevent users to setup their
own HTTP, FTP, SMTP servers etc.. I've done port forwarding from 8000 to
80 on my router but the images can't seem to appear to load in the browser
with the URL having a :8000 attached to it. When I remove the code* from
the app/etc/local.xml file, everything becomes fine.
I want to try to enable Redis because I've used it before and it speeds up
my Magento site many times more. What should I do to bridge the 2
solutions together?
FYI, the conflicting code in app/etc/local.xml that is causing the problem is
<!-- This is a child node of config/global -->
<cache>
<backend>Cm_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server> <!-- or absolute path to unix socket -->
<port>6379</port>
<persistent></persistent> <!-- Specify unique string to enable
persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm
are known: https://github.com/nicolasff/phpredis/issues/70 -->
<database>0</database> <!-- Redis database number; protection against
accidental data loss is improved by not sharing databases -->
<password></password> <!-- Specify if your Redis server requires
authentication -->
<force_standalone>0</force_standalone> <!-- 0 for phpredis, 1 for
standalone PHP -->
<connect_retries>1</connect_retries> <!-- Reduces errors due to
random connection failures; a value of 1 will not retry after the
first failure -->
<read_timeout>10</read_timeout> <!-- Set read timeout
duration; phpredis does not currently support setting read timeouts
-->
<automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled
by default -->
<compress_data>1</compress_data> <!-- 0-9 for compression level,
recommended: 0 or 1 -->
<compress_tags>1</compress_tags> <!-- 0-9 for compression level,
recommended: 0 or 1 -->
<compress_threshold>20480</compress_threshold> <!-- Strings below
this size will not be compressed -->
<compression_lib>gzip</compression_lib> <!-- Supports gzip, lzf and
snappy -->
</backend_options>
</cache>
<!-- This is a child node of config/global for Magento Enterprise FPC -->
<full_page_cache>
<backend>Cm_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server> <!-- or absolute path to unix socket -->
<port>6379</port>
<persistent></persistent> <!-- Specify unique string to enable
persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm
are known: https://github.com/nicolasff/phpredis/issues/70 -->
<database>1</database> <!-- Redis database number; protection against
accidental data loss is improved by not sharing databases -->
<password></password> <!-- Specify if your Redis server requires
authentication -->
<force_standalone>0</force_standalone> <!-- 0 for phpredis, 1 for
standalone PHP -->
<connect_retries>1</connect_retries> <!-- Reduces errors due to
random connection failures -->
<lifetimelimit>57600</lifetimelimit> <!-- 16 hours of lifetime for
cache record -->
<compress_data>0</compress_data> <!-- DISABLE compression for
EE FPC since it already uses compression -->
</backend_options>
</full_page_cache>
Even with the removal of the second half of the code (My Magento is
1.7CE), it still doesn't work at all.
I also did not change ports.conf on my server (left it at listen 80
because port forwards to port 80 locally)
No comments:
Post a Comment