Trying to Implement a magento Post with ISPconfig

Discussion in 'General' started by llamy, Apr 28, 2008.

  1. llamy

    llamy New Member

    Hi, I'm trying to implement this great post by Oliver Meyer : http://www.howtoforge.org/magento-e-commerce-solution-debian-etch by using Ispconfig.

    I'm running in two problems here :

    1) Should i copy/paste the whole virtual host stuff for http and https into ISPConfig Apache Directives Optional or are there some modifications to make to it. if so what should i change into it.here is the example for http:

    NameVirtualHost 192.168.0.100:80

    <VirtualHost 192.168.0.100:80>
    ServerName www.example.com
    ServerAdmin [email protected]
    DocumentRoot /var/www/magento/

    <Directory /var/www/magento/>
    AllowOverride All
    </Directory>

    ErrorLog /var/log/apache2/magento_error.log
    CustomLog /var/log/apache2/magento_access.log combined
    LogLevel warn

    </VirtualHost>


    2) I want to use suPHP, in order to avoid this: chown -R root:www-data magento/

    but according to this great Falko Howto: http://www.howtoforge.org/suphp_debian_etch_ispconfig, i should remove all the phpadmin entries within the original Vhosts_ispconfig.conf file , but in my Vhosts_ispconfig.conf they all start with php_admin, so what part exactly of the string should i remove.

    Also i'm a bit confused because in this post by Falko: http://howtoforge.net/install-suphp...tions-for-use-with-ispconfig-2.2.20-and-above, there is no mention of removing phpadmin.

    3) Mi third question is that should i put php safe mode on or off, can you please tell me the diffirence.

    Thank you for all.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) You dont need this vhost lines at all, as the vosts are configured by ISPConfig.

    2) From the howto:

    Edit /home/admispconfig/ispconfig/lib/config.inc.php find the line:

    $go_info["server"]["apache2_php"] = 'both';

    and change to:

    $go_info["server"]["apache2_php"] = 'suphp';

    3) Must likely you will have to turn it off.
     
  3. llamy

    llamy New Member

    Thanks Till for the reply,

    for 1) Thanks i put if off
    for 2)

    Do you mean that by doing what you suggested in 2), i do not need the howto at all, or should i do this with the howto as well, if so where exactly please in the howto should i put 2)

    now a new question, according to one of your posted howto, we should take away for security reason some .htaccess lines and put them in the ispconfig apache directives. I cannot find the howto link here but, i'm trying to install magento on a /var/www/web1/web, that magento directory contains a .htaccess., when i run the http://www.mywebsite.com/magento, i have an internal server error 500.

    i went to the error.log of the website and first it says :
    var/www/web1/web/magento/.htaccess: php_value not allowed here
    so i took out the php_value line from the .htaccess and put it in the ispconfig apache directives.

    then i run http://www.mywebsite.com/magento again, the first error did come back in the error.log but i have a new internal server 500 error in the error.log that says :
    var/www/web1/web/magento/.htaccess: php_flag not allowed here

    so again i took out the php_flag line from the .htaccess and put it in the ispconfig apache directives.

    then i run http://www.mywebsite.com/magento again, the second error did come back in the error.log but i have a new internal server 500 error in the error.log that says :
    var/www/web1/web/magento/.htaccess: SSLOptions not allowed here

    so now i wonder if i'm doing the right thing here, should i put all the <IfModule></IfModule> in ispconfig apache directives ?

    when i just run http://www.mywebsite.com without going to the magento folder everything works fine.

    Thank you.
     
  4. llamy

    llamy New Member

    ok here is the .htaccess inside the magento directory>

    ############################################
    ## uncomment these lines for CGI mode
    ## make sure to specify the correct cgi php binary file name
    ## it might be /cgi-bin/php-cgi

    # Action php5-cgi /cgi-bin/php5-cgi
    # AddHandler php5-cgi .php
    # php_flag cgi.fix_pathinfo on

    ############################################
    ## this line is specific for 1and1 hosting

    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

    ############################################
    ## default index file

    DirectoryIndex index.php

    <IfModule mod_php5.c>

    ############################################
    ## adjust memory limit

    php_value memory_limit 64M
    php_value max_execution_time 18000

    ############################################
    ## disable magic quotes for php request vars

    php_flag magic_quotes_gpc off

    ############################################
    ## enable resulting html compression

    #php_flag zlib.output_compression on

    ###########################################
    # disable user agent verification to not break multiple image upload

    php_flag suhosin.session.cryptua off

    </IfModule>

    <IfModule mod_security.c>
    ###########################################
    # disable POST processing to not break multiple image upload

    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    <IfModule mod_deflate.c>

    ############################################
    ## enable apache served files compression
    ## http://developer.yahoo.com/performance/rules.html#gzip

    # Insert filter
    #SetOutputFilter DEFLATE

    # Netscape 4.x has some problems...
    #BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    #BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    #Header append Vary User-Agent env=!dont-vary

    </IfModule>

    <IfModule mod_ssl.c>

    ############################################
    ## make HTTPS env vars available for CGI mode

    SSLOptions StdEnvVars

    </IfModule>

    <IfModule mod_rewrite.c>

    ############################################
    ## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

    ############################################
    ## you can put here your magento root folder
    ## path relative to web root

    #RewriteBase /magento/

    ############################################
    ## workaround for HTTP authorization
    ## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    ############################################
    ## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

    ############################################
    ## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

    ############################################
    ## rewrite everything else to index.php

    RewriteRule .* index.php [L]

    </IfModule>


    ############################################
    ## Prevent character encoding issues from server overrides
    ## If you still have problems, use the second line instead

    AddDefaultCharset Off
    #AddDefaultCharset UTF-8

    <IfModule mod_expires.c>

    ############################################
    ## Add default Expires header
    ## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresDefault "access plus 1 year"

    </IfModule>

    ############################################
    ## By default allow all access

    Order allow,deny
    Allow from all

    ############################################
    ## If running in cluster environment, uncomment this
    ## http://developer.yahoo.com/performance/rules.html#etags

    #FileETag none



    Thank you for your replies
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Remove all php_value and php_flag lines from the .htaccess file and apache directives field, these variables are incompatible with suphp and most likely not needed at all.
     
  6. llamy

    llamy New Member

    Thank you!

    now i have an internal error 500 with this var/www/web1/web/magento/.htaccess: SSLOptions not allowed here

    i think because of this line in the .htaccess:

    ############################################
    ## make HTTPS env vars available for CGI mode

    SSLOptions StdEnvVars

    should i remove it also, safely!
    would you please also check my question about suPHP!

    Thanks
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Yes, please remove the SSLOptions line.
     
  8. llamy

    llamy New Member

    Thanks Falko!

    After removing the SSLOptions line i got a 500 internal server error saying: Options not allowed here so i also removed the Options +FollowSymLinks line to get it working, i hope it does not hurt doing so :)

    Now about your howto on suPHP located here: http://howtoforge.net/install-suphp...tions-for-use-with-ispconfig-2.2.20-and-above

    Till says :
    From the howto:

    Edit /home/admispconfig/ispconfig/lib/config.inc.php find the line:

    $go_info["server"]["apache2_php"] = 'both';

    and change to:

    $go_info["server"]["apache2_php"] = 'suphp';

    my question is that, should i have to do this after the whole howto, or at some point in the howto.

    Thank you very much.
     
  9. falko

    falko Super Moderator ISPConfig Developer

  10. llamy

    llamy New Member

    Thank you Falko for you time to answer me, i'm really sorry about the question, i should have read the howto to the end.

    llamy.
     

Share This Page