Re: Liquid Feedback
Δημοσιεύτηκε: 28 Μαρ 2012, 16:42
Thanks θα παίξω λίγο ακόμα το βραδάκι. 
Για Μέλη και φίλους του Κόμματος Πειρατών Ελλάδας.
https://forum.pirateparty.gr/
Ναι θα στηθεί στον VPS. Εχθές δουλεύαμε μέχρι τις 2:30 τη νύχτα με τους Yiannis και pappasadrian. Ο VPS προχωράει, αλλά δεν κάνουμε βιαστικές κινήσεις, γιατί θέλουμε να γίνει σωστά (είναι πολλές οι παράμετροι), με ασφάλεια και με την μικρότερη διακοπή των υπαρχόντων υπηρεσιών.Οδυσσεας έγραψε:Το σίγουρο είναι ότι πρέπει να στηθεί το Liquid Feedback η κάτι αντίστοιχο όσο πιο δυνατόν γίνετε, για να μπορέσει το κόμμα να πάρει αποφάσεις. Θα στηθεί στον VPS και αν ναι έχει αναλάβει κάποιος να το κάνει;
Κώδικας: Επιλογή όλων
config.absolute_base_url = "http://lf.deb1/"
execute.config("default")
config.formatting_engine_executeables = {
rocketwiki= "/opt/rocketwiki-lqfb/rocketwiki-lqfb",
compat = "/opt/rocketwiki-lqfb/rocketwiki-lqfb-compat"
}
config.fastpath_url_func = function(member_id, image_type)
return "http://lf.deb1/fastpath/getpic?" .. tostring(member_id) .. "+" .. tostring(image_type)
end
Κώδικας: Επιλογή όλων
# a2ensite lf.deb1
# service apache2 reload
Κώδικας: Επιλογή όλων
<VirtualHost *:80>
ServerName lf.deb1
ServerAdmin webmaster@localhost
DocumentRoot /opt/lfroot/
# Apache modules cgi_module, env, rewrite and alias must be loaded before
# Take a look in your main apache configuration!
RewriteEngine on
#RewriteLog /var/log/apache2/rewrite.log
#RewriteLogLevel 3
# do not rewrite static URLs
RewriteRule ^/fastpath/(.*)$ /fastpath/$1 [PT,L]
RewriteRule ^/static/(.*)$ /static/$1 [PT,L]
# base URL
RewriteRule ^/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&$2 [PT,QSA]
# module base URLs
RewriteRule ^/([^/\?]+)/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&$3 [PT,QSA]
# actions
RewriteRule ^/([^/\?]+)/([^/\.\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&$4 [PT,QSA]
# views without numeric id or string ident
RewriteRule ^/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&$5 [PT,QSA]
# views with numeric id or string ident
RewriteRule ^/([^/\?]+)/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&$6 [PT,QSA]
# Directly serve static files
Alias /fastpath/ /opt/liquid_feedback_frontend/fastpath/
Alias /static/ /opt/liquid_feedback_frontend/static/
# Connect extarnal path to the webmcp cgi interface
ScriptAlias /cgi-bin /opt/webmcp/cgi-bin
# Allow CGI execution for the webmcp CGI interface
<Directory "/opt/webmcp/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
# Configure environment for demo application
<Location />
SetEnv LANG 'en_US.UTF-8'
SetEnv WEBMCP_APP_BASEPATH '/opt/liquid_feedback_frontend/'
SetEnv WEBMCP_CONFIG_NAME 'testing'
</Location>
</VirtualHost>
Κώδικας: Επιλογή όλων
root@deb1:/opt# tree -L 2
.
├── lfroot
│ └── favicon.ico
├── liquid_feedback_frontend
│ ├── app
│ ├── bin
│ ├── config
│ ├── db
│ ├── doc
│ ├── env
│ ├── fastpath
│ ├── LICENSE
│ ├── locale
│ ├── model
│ ├── README
│ ├── static
│ ├── tmp
│ └── utils
├── rocketwiki-lqfb
│ ├── rocketwiki-lqfb
│ └── rocketwiki-lqfb-compat
└── webmcp
├── accelerator
├── bin
├── cgi-bin
├── env
├── js
└── lib
Κι εγώ VirtualHost έφτιαξα με το δικό του document root, απλά απ' ευθείας με ssh + cli. Είναι σημαντικό να μην βάλεις όλα τα αρχεία κάτω από το DocumentRoot (δες την προειδοποίηση εδώ). Τα ISPconfig, cpanel, κ.τ.λ. δεν τα δουλεύω και δεν τα ξέρω.baskin έγραψε:Αν πρέπει να κάτσει σε "hosting χώρο" πως λες να γίνεται;
Το ISPconfig δημιουργεί διαφορετικούς "χώρους" για κάθε virtual host (είναι hosting πλατφόρμα). Θα φτιάξουμε έναν vhost π.χ. liquid.pirateparty.gr, ο οποίος θα έχει το δικό του document root. Βέβαια νομίζω ότι γίνεται να έχεις και πράγματα απέξω, θα το δω.
Ακόμη και στον "αυτόματο" χώρο που κάνει το ISPconfig το cgi-bin είναι εκτός document root. Το έχουν προβλέψει.pav έγραψε:Κι εγώ VirtualHost έφτιαξα με το δικό του document root, απλά απ' ευθείας με ssh + cli. Είναι σημαντικό να μην βάλεις όλα τα αρχεία κάτω από το DocumentRoot (δες την προειδοποίηση εδώ). Τα ISPconfig, cpanel, κ.τ.λ. δεν τα δουλεύω και δεν τα ξέρω.
Κώδικας: Επιλογή όλων
<Directory /var/www/liquid.pirateparty.gr>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/liquid.pirateparty.gr/web
ServerName liquid.pirateparty.gr
ServerAdmin [email protected]
ErrorLog /var/log/ispconfig/httpd/liquid.pirateparty.gr/error.log
<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/liquid.pirateparty.gr/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<Files ~ '.php[s3-6]{0,1}$'>
Order allow,deny
Deny from all
Allow from none
</Files>
</Directory>
<Directory /var/www/clients/client1/web5/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<Files ~ '.php[s3-6]{0,1}$'>
Order allow,deny
Deny from all
Allow from none
</Files>
</Directory>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web5 client1
</IfModule>
<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client1/web5/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>
RewriteEngine on
RewriteRule ^/fastpath/(.*)$ /fastpath/$1
RewriteRule ^/static/(.*)$ /static/$1
RewriteRule ^/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&$2
RewriteRule ^/([^/\?]+)/(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&$3
RewriteRule ^/([^/\?]+)/([^/\.\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&$4
RewriteRule ^/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&$5
RewriteRule ^/([^/\?]+)/([^/\?]+)/([^/\.\?]+)\.([^/\?]+)(\?(.*))?$ /cgi-bin/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&$6
Alias /fastpath/ /var/www/liquid.pirateparty.gr/liquid_feedback_frontend/fastpath/
Alias /static/ /var/www/liquid.pirateparty.gr/liquid_feedback_frontend/static/
ScriptAlias /cgi-bin /var/www/liquid.pirateparty.gr/webmcp/cgi-bin
<Directory "/var/www/liquid.pirateparty.gr/webmcp/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<Location />
SetEnv LANG 'en_US.UTF-8'
SetEnv WEBMCP_APP_BASEPATH '/var/www/liquid.pirateparty.gr/liquid_feedback_frontend/'
SetEnv WEBMCP_CONFIG_NAME 'testing'
</Location>
</VirtualHost>Κώδικας: Επιλογή όλων
[Sat Apr 07 02:25:25 2012] [error] [client 85.73.236.226] File does not exist: /var/www/liquid.pirateparty.gr/web/cgi-bin