Join the community today
Register Now

Some Problems With Social Engine

Discussion in 'Blogs & CMS usage' started by Cr0w, Jul 31, 2015.

  1. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    4:24 PM
    1.9.x
    5.5
    hi every one , the CentminMod Nginx Web Server have some problems with social engine CMS

    the problem is : Nginx Rewrite Module .

    look the .htaccess codes for apache .


    Code:
    <IfModule mod_rewrite.c>
      Options +FollowSymLinks
      RewriteEngine On
    
      # Get rid of index.php
      RewriteCond %{REQUEST_URI} /index\.php
      RewriteRule (.*) index.php?rewrite=2 [L,QSA]
    
      # Rewrite all directory-looking urls
      RewriteCond %{REQUEST_URI} /$
      RewriteRule (.*) index.php?rewrite=1 [L,QSA]
    
      # Try to route missing files
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} public\/ [OR]
      RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
      RewriteRule . - [L]
     
      # If the file doesn't exist, rewrite to index
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
    
    </IfModule>
    
    # sends requests /index.php/path/to/module/ to "index.php"
    # AcceptPathInfo On
    
    # @todo This may not be effective in some cases
    FileETag Size
    
    <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
    </IfModule>
    this is main .htaccess file in root of social engine directory

    and this in temporay folder :
    Code:
    allow from none
    deny from all
    and here is public folder /root-of-social-engine/public :
    Code:
    # $Id: .htaccess 8220 2011-01-15 00:21:51Z john $
    
    <FilesMatch "\.(avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">
      <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault A29030400
        <IfModule mod_headers.c>
          Header append Cache-Control "public"
        </IfModule>
      </IfModule>
      <IfModule !mod_expires.c>
        <IfModule mod_headers.c>
            Header set Expires "Sun, 1 Jan 2012 00:00:00 GMT"
            Header append Cache-Control "max-age=172800, public"
        </IfModule>
      </IfModule>
    </FilesMatch>
    and here is install folder :
    Code:
    
    # $Id: .htaccess 7554 2010-10-05 03:40:58Z john $
    
    <IfModule mod_rewrite.c>
      Options +FollowSymLinks
      RewriteEngine On
    
      # Get rid of index.php
      RewriteCond %{REQUEST_URI} /index\.php
      RewriteRule (.*) index.php?rewrite=2 [L,QSA]
    
      # Rewrite all directory-looking urls
      RewriteCond %{REQUEST_URI} /$
      RewriteRule (.*) index.php?rewrite=1 [L,QSA]
    
      # Special cases
      RewriteCond %{REQUEST_URI} static
      # RewriteRule (.*) Boostrap.php [L,QSA]
      RewriteRule (.*) index.php?rewrite=1 [L,QSA]
    
      # Try to route missing files
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} public\/ [OR]
      RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
      RewriteRule . - [L]
    
      # If the file doesn't exist, rewrite to index
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
    
    </IfModule>
    
    <IfModule mod_php5.c>
      php_value   post_max_size         100M
      php_value   upload_max_filesize   100M
      php_value   max_input_time        600
      php_value   max_execution_time    600
      php_value   memory_limit          128M
    </IfModule>
    
    # @todo This may not be effective in some cases
    FileETag Size
    
    And this is externals folder :
    Code:
    
    # $Id: .htaccess 9339 2011-09-29 23:03:01Z john $
    
    <FilesMatch "\.(avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">
      <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault A29030400
        <IfModule mod_headers.c>
          Header append Cache-Control "public"
        </IfModule>
      </IfModule>
      <IfModule !mod_expires.c>
        <IfModule mod_headers.c>
            Header set Expires "Sun, 1 Jan 2012 00:00:00 GMT"
            Header append Cache-Control "max-age=172800, public"
        </IfModule>
      </IfModule>
      <IfModule mod_deflate.c>
        SetOutputFilter DEFLATE
        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip)$ no-gzip
        <IfModule mod_headers.c>
          # properly handle requests coming from behind proxies
          Header append Vary User-Agent
        </IfModule>
        # old browsers
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      </IfModule>
    </FilesMatch>
    
    
    And this is Applications folder :
    Code:
    
    # $Id: .htaccess 8220 2011-01-15 00:21:51Z john $
    
    deny from all
    <Files ~ "index.php|css.php|mobile.php|lite.php|offline.html|maintenance.html">
        order allow,deny
        allow from all
    </Files>
    
    <FilesMatch "\.(avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">
      <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault A29030400
        <IfModule mod_headers.c>
          Header append Cache-Control "public"
        </IfModule>
      </IfModule>
    
      <IfModule !mod_expires.c>
        <IfModule mod_headers.c>
            Header set Expires "Sun, 1 Jan 2012 00:00:00 GMT"
            Header append Cache-Control "max-age=172800, public"
        </IfModule>
      </IfModule>
    </FilesMatch>
    
    what should i do ?
    i want an nginx.conf rules for my nginx webserver .
     
  2. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    4:24 PM
    1.9.x
    5.5
    And Something else .
    how do i set my open_Basedir options ?
    and how to set mysql.reconnect off ?
    like this image [​IMG]
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    10:54 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    For Social Engine you're on your own as I have never used it myself.

    to customise php.ini settings see FAQ item 28 however, by default that is already off
    for open_basedir see FAQ item 26
     
  4. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    4:24 PM
    1.9.x
    5.5
    so just can convert .htaccess codes to nginx.conf ? thats very useful and you can release that codes on socialengine.com
    there are to many users they have problem like me the problem is Mod_Rewrite when i installing social engine can't detect the mod_rewrite_engine .
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,895
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    10:54 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You should ask on Social Engine support/forums as there should be other users who use Nginx already and would know better than me
     
  6. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    8:54 PM
    Mainline
    10.2
    If he is a license holder :)