2017-03-29 3 views
0

MacromediaのMAMPの中にJoomla 3.6.5がインストールされていて、完璧に動作しますが、Joomlaがデフォルトでインストールプロセスのサンプルデモをインストールしました。動作しません。私もdocumentation about Joomla and NGINXを読んで、nginx.confファイルにいくつかの変更を適用しますが、それは修正されません。JoomlaのサンプルはMAMPのNGINXで動作しません

これは、/アプリケーション/ MAMP/confに/ nginxのディレクトリ上にある私のnginx.confファイルです:私はhttp://localhost:7888/joomla3/index.php/getting-startedを訪問しようとすると、

user       myuser staff; 
worker_processes    2; 

events { 
    worker_connections  1024; 
} 

http { 
    include     mime.types; 
    default_type    text/html; 
    gzip on; 

    gzip_comp_level 6; 
    gzip_min_length 1100; 
    gzip_buffers 4 8k; 
    gzip_types    text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon; 

    sendfile     on; 
    client_max_body_size 200M; 

    server { 
     listen    7888 default_server; 

     server_name localhost; 
     server_name_in_redirect off; 

     access_log   /Applications/MAMP/logs/nginx_access.log; 
     error_log   /Applications/MAMP/logs/nginx_error.log; 
     # MAMP DOCUMENT_ROOT !! Don't remove this line !! 
     root     "/Applications/MAMP/htdocs"; 
     index index.php index.html index.htm default.html default.htm; 

     location/{ 
      #index   index.html index.php; 
      #try_files $uri $uri/ /index.php?$args; 
      try_files $uri $uri/ /index.php?q=$request_uri; 
     } 

     location ~* /MAMP[^-]*(.*)$ { 
      root    /Applications/MAMP/bin; 
      index   index.php; 

      location ~ \.php$ { 
       try_files  $uri =404; 
       fastcgi_pass  unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; 
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
       include   fastcgi_params; 
      } 
     } 

     location ~* /phpMyAdmin(.*)$ { 
      root    /Applications/MAMP/bin; 
      index   index.php; 

      location ~ \.php$ { 
       try_files  $uri =404; 
       fastcgi_pass  unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; 
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
       include   fastcgi_params; 
      } 
     } 

     location ~* /phpPgAdmin(.*)$ { 
      root    /Applications/MAMP/bin; 
      index   index.php; 

      location ~ \.php$ { 
       try_files  $uri =404; 
       fastcgi_pass  unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; 
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
       include   fastcgi_params; 
      } 
     } 
     # deny running scripts inside writable directories 
     location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ { 
       return 403; 
       error_page 403 /403_error.html; 
     } 

     location ~* /phpLiteAdmin(.*)$ { 
      root    /Applications/MAMP/bin; 
      index   index.php; 

      location ~ \.php$ { 
       try_files  $uri =404; 
       fastcgi_pass  unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; 
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
       include   fastcgi_params; 
      } 
     } 

     location ~* /SQLiteManager(.*)$ { 
      root    /Applications/MAMP/bin; 
      index   index.php; 

      location ~ \.php$ { 
       try_files  $uri =404; 
       fastcgi_pass  unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; 
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
       include   fastcgi_params; 
      } 
     } 

     location ~* /adminer(.*)$ { 
      root    /Applications/MAMP/bin; 
      index   adminer.php; 

      location ~ \.php$ { 
       try_files  $uri =404; 
       fastcgi_pass  unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; 
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
       include   fastcgi_params; 
      } 
     } 

     location /icons { 
      alias /Applications/MAMP/Library/icons; 
      autoindex on; 
     } 

     location /favicon.ico { 
      alias /Applications/MAMP/bin/favicon.ico; 
      # log_not_found off; 
      # access_log off; 
     } 

     location ~ \.php$ { 

      try_files  $uri =404; 
      fastcgi_pass  unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; 
      fastcgi_index index.php; 
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
      include   fastcgi_params; 
      include fastcgi.conf; 
     } 

     location ~ /\. { 
      deny all; 
     } 
     # caching of files 
     location ~* \.(ico|pdf|flv)$ { 
       expires 1y; 
     } 

     location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ { 
       expires 14d; 
     } 
     # location ~* \.(gif|jpg|png|pdf)$ { 
     # expires   30d; 
     # } 

     # location = /robots.txt { 
     # allow all; 
     # log_not_found off; 
     # access_log off; 
     # } 

     # location ~* \.(txt|log)$ { 
     # allow 127.0.0.1; 
     # deny all; 
     # } 

     # location ~ \..*/.*\.php$ { 
     # return 403; 
     # } 

     location /nginx_status { 
      stub_status  on; 
      access_log  off; 
      allow   127.0.0.1; 
      deny    all; 
     } 
    } 

    # HTTPS server 
    # 
    #server { 
    # listen  443 ssl; 
    # server_name localhost; 

    # ssl_certificate  cert.pem; 
    # ssl_certificate_key cert.key; 

    # ssl_session_cache shared:SSL:1m; 
    # ssl_session_timeout 5m; 

    # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
    # ssl_ciphers HIGH:!aNULL:!MD5; 
    # ssl_prefer_server_ciphers on; 

    # location/{ 
    #  root html; 
    #  index index.html index.htm; 
    # } 
    #} 
} 

これは、私が持っているエラーです:

enter image description here

答えて

0

公式のJoomlaのガイドは機能しなくなり、更新する必要があります。

問題は正確にthisです。基本的に、何が起こっているのは、nginxが$_SERVER['PHP_SELF']変数の値を設定していないということです。これはJoomlaのコアに大きく依存しています。この問題を解決するにはnginx.confPATH_TRANSLATEDの値を設定し、$_SERVER['PHP_SELF']の値を設定します。

+0

こんにちは。この回答の後半には申し訳ありませんが、私はこの2ヶ月間とても忙しくて、MAMPでPATH_TRANSLATEDを設定しようとしましたが、nginx.confとfastcgi_paramsを再度編集しましたが、問題は解決しません。あなたは私が何をすべきかについて、より詳細に説明します。 – Leo1234562014

関連する問題