Kim Quyen Ly wrote:
> I am follow the guide in Care Development Blog " Installing care2x 2.6 
> alpha" http://care2x.wordpress.com/2008/11/03/installing-care2x-26-alpha/
> I had success when install phpmyadmin,  but when I test it : 
> http://localhost/phpmyadmin, I received the error " 403 Forbidden"
> (I test success nginx ).

 From this I will assume that your nginx setup was successful set up, 
and that it is serving both .html and .php pages.


# 1. change 'pma.clinica' for your own values:
# start by defining some temporary host names
sudo sed -i -e 's/^127\.0\.0\.1.*/127\.0\.0\.1 localhost clinica.0 
www.clinica.0 pma.clinica.0 care2x.clinica.0/' /etc/hosts

grep '127.0.0.1' /etc/hosts # check if all went well

sudo /etc/init.d/networking restart # restart to apply changes


# 2. Use a text editor to create a nginx config for phpmyadmin, changing 
'pma.clinica.0' for your own values:
sudo nano /etc/nginx/sites-available/spma

# and copy-and-paste into it the text between the "# --- cut here ---" 
bellow.

# 3. then activate it in nginx:
sudo ln -svf /etc/nginx/sites-available/spma /etc/nginx/sites-enabled/
sudo kill -15 $(/bin/pidof nginx) ; sudo /etc/init.d/nginx restart

# 4. test if it works with:
# https://pma.clinica.0/
http://pma.clinica.0/


# 5. After checking that all went well, you may create another file to 
start care2x (let's call it /etc/nginx/sites-available/care2x). In this 
case, besides changing 'pma.clinica.0' for your own values, also change 
the root directive to something like:
root /var/www/nginx-default/care2x;
(or to any other place were you created or linked to your care2x directory)


That should do it.

M.




# --- cut here ---
# nginx - /etc/nginx/sites-available/spma
#
server {
        listen pma.clinica.0:80;
        server_name pma.clinica.0;
        # redirect to secure https page
#       rewrite ^ https://pma.clinica.0$request_uri? permanent;
#}
#server {
#       listen pma.clinica.0:443;
#       server_name pma.clinica.0;

        access_log /var/log/nginx/spma.access.log;
        error_log /var/log/nginx/spma.error.log;

        root /usr/share/phpmyadmin;

#       ssl  on;
#       ssl_certificate /etc/nginx/ssl/clinica/server.crt;
#       ssl_certificate_key /etc/nginx/ssl/clinica/server.key;

        location / {
                include /etc/nginx/fastcgi_params;
                fastcgi_pass unix:/tmp/php-fastcgi.socket;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME 
$document_root$fastcgi_script_name;
#               fastcgi_param HTTPS on;
        }
}
# --- cut here ---


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to