Mac with Mamp When development environment Laravel page appears not found

Source: Internet
Author: User
Tags sendfile xsl phpmyadmin
I am learning laravel According to this study document

On Ubuntu has already knocked over one side of the code, the link with the ID is normal access to the LOCALHOST/ARTICLES/ID display database content, but in the Mac Mamp environment URL with parameter access will appear page not found do not know why

@section('content')            

id }}" rel="bookmark"> {{ $article->title }}> *这个A标签里面带的id*

{{ $article->content }} @endsection

It's supposed to be mamp inside nginx.conf to change, but I don't know why.

User root admin;worker_processes 2;events {worker_connections 1024;}    HTTP {include mime.types;    Default_type text/html;    gzip on; 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;        server {Listen default_server; # MAMP Document_root!!        Don ' t remove this line!!        Root "/applications/mamp/htdocs/laravel/public";        Access_log/applications/mamp/logs/nginx_access.log;        Error_log/applications/mamp/logs/nginx_error.log Debug;        Location/{index index.html index.php;            } 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;            }} 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/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_param script_filename $document _root$fastcgi_script_name;        Include Fastcgi_params; } location ~/\.        {Deny All; } # 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; #    }    #}}

Is there any great God who has encountered such problems???

Reply content:

I am learning laravel According to this study document

On Ubuntu has already knocked over one side of the code, the link with the ID is normal access to the LOCALHOST/ARTICLES/ID display database content, but in the Mac Mamp environment URL with parameter access will appear page not found do not know why

@section('content')            

id }}" rel="bookmark"> {{ $article->title }}> *这个A标签里面带的id*

{{ $article->content }} @endsection

It's supposed to be mamp inside nginx.conf to change, but I don't know why.

User root admin;worker_processes 2;events {worker_connections 1024;}    HTTP {include mime.types;    Default_type text/html;    gzip on; 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;        server {Listen default_server; # MAMP Document_root!!        Don ' t remove this line!!        Root "/applications/mamp/htdocs/laravel/public";        Access_log/applications/mamp/logs/nginx_access.log;        Error_log/applications/mamp/logs/nginx_error.log Debug;        Location/{index index.html index.php;            } 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;            }} 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/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_param script_filename $document _root$fastcgi_script_name;        Include Fastcgi_params; } location ~/\.        {Deny All; } # 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; #    }    #}}

Is there any great God who has encountered such problems???

I understand that if Nginx accesses PHP, it needs to pass php-fpm ....

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.