Announcement

Collapse
No announcement yet.

installation help please -newbie

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • installation help please -newbie

    Hi,

    I am new to server setup (apache, Nginx) etc. I am using Nginx web server.
    when installing Espocrm, it gives the following message and does not let me go further with installation.

    API Error: EspoCRM API unavailable.
    Add this code to your Nginx Host Config (inside "server" block):

    then it gives me the following code

    location /api/v1/ { if (!-e $request_filename){ rewrite ^/api/v1/(.*)$ /api/v1/index.php last; break; } } location / { rewrite reset/?$ reset.html break; } location ^~ (data|api)/ { if (-e $request_filename){ return 403; } } location ^~ /data/logs/ { return 403; } location ^~ /data/config.php { return 403; } location ^~ /data/cache/ { return 403; } location ^~ /data/upload/ { return 403; } location ^~ /application/ { return 403; } location ^~ /custom/ { return 403; } location ^~ /vendor/ { return 403; }+

    I tried adding the above code in nginx.conf file- see below.

    server {

    # access from localhost only
    listen 192.168.1.100:8001;
    server_name localhost;
    root www;

    # the following default "catch-all" configuration, allows access to the server from outside.
    # please ensure your firewall allows access to
    tcp/port 80. check your "skype" config.
    # listen 80;
    # server_name _;

    log_not_found off;
    charset utf-8;

    access_log logs/access.log main;

    # handle files in the root path /www
    location / {
    index index.php index.html index.htm;


    THIIS IS WHERE I ADDED THE ABOVE CODE


    }


    (but adding above code here gives this error in nginx log file--- location "(data|api)/" is outside location "/" in C:/server/bin/ nginx /conf/nginx.conf

    My questions are'
    1. Am I adding teh code in right file?
    2. Am I adding the code in right location? (inside SERVER BLOCK)
    3. Am I meant to change the text 'location' to actual location (/crm/api/v1) + do I need to change location in every line where it says the word 'location'


    EspoCRM installation directory is /www/crm/
    Ngix server directory is C:/server/bin/nginx

    Appreciate it if someone can help me with this (or installation of Espocrm)





  • #2
    Please try to add after the "location / {" and in this format "location <FULL_PATH_TO_ESPO>/api/v1/ {"
    Job Offers and Requests

    Comment

    Working...
    X