nginx - 安装好Vagrant larval/homestead之后,启动虚拟机无法index.SegmentFault
装好虚拟机后,Vagrant up虚拟机启动,访问设定的home地址只显示welcome to nginx,无法渲染出phpinfo();
这是nginx.conf:
<code>user vagrant; worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## #Server settings ## server { listen 80; server_name fancygo.app; location ~ \.(php|html|htm)$ { fastcgi_pass unix:/run/php-fpm.sock; fastcgi_index index.php; include fastcgi.conf; root /home/vagrant/Code/FancyGo/public; } } ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; #include /etc/nginx/sites-enabled/*; } #mail { # # See sample authentication script at: # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript # # # auth_http localhost/auth.php; # # pop3_capabilities "TOP" "USER"; # # imap_capabilities "IMAP4rev1" "UIDPLUS"; # # server { # listen localhost:110; # protocol pop3; # proxy on; # } # # server { # listen localhost:143; # protocol imap; # proxy on; # } #} </code>
这是我的homestead.yaml:
<code>--- ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: ~/Sites/FancyGo to: /home/vagrant/Code/FancyGo sites: - map: FancyGo.app to: /home/vagrant/Code/FancyGo/public databases: - homestead # blackfire: # - id: foo # token: bar # client-id: foo # client-token: bar # ports: # - send: 50000 # to: 5000 # - send: 7777 # to: 777 # protocol: udp </code>
请各位帮忙看看问题出在哪里?该怎么配置nginx?
另外,很诡异的是我即使把nginx关了,访问设定的map地址都还能出现“welcome to nginx”我真是日了狗了~原来是map的地址对应的ip地址是“127.0.53.53”,这是个什么鬼~
回复内容:
装好虚拟机后,Vagrant up虚拟机启动,访问设定的home地址只显示welcome to nginx,无法渲染出phpinfo();
这是nginx.conf:
<code>user vagrant; worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## #Server settings ## server { listen 80; server_name fancygo.app; location ~ \.(php|html|htm)$ { fastcgi_pass unix:/run/php-fpm.sock; fastcgi_index index.php; include fastcgi.conf; root /home/vagrant/Code/FancyGo/public; } } ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; #include /etc/nginx/sites-enabled/*; } #mail { # # See sample authentication script at: # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript # # # auth_http localhost/auth.php; # # pop3_capabilities "TOP" "USER"; # # imap_capabilities "IMAP4rev1" "UIDPLUS"; # # server { # listen localhost:110; # protocol pop3; # proxy on; # } # # server { # listen localhost:143; # protocol imap; # proxy on; # } #} </code>
这是我的homestead.yaml:
<code>--- ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: ~/Sites/FancyGo to: /home/vagrant/Code/FancyGo sites: - map: FancyGo.app to: /home/vagrant/Code/FancyGo/public databases: - homestead # blackfire: # - id: foo # token: bar # client-id: foo # client-token: bar # ports: # - send: 50000 # to: 5000 # - send: 7777 # to: 777 # protocol: udp </code>
请各位帮忙看看问题出在哪里?该怎么配置nginx?
另外,很诡异的是我即使把nginx关了,访问设定的map地址都还能出现“welcome to nginx”我真是日了狗了~原来是map的地址对应的ip地址是“127.0.53.53”,这是个什么鬼~

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

Session_Start ()로 여러 통화를하면 경고 메시지와 가능한 데이터 덮어 쓰기가 발생합니다. 1) PHP는 세션이 시작되었다는 경고를 발행합니다. 2) 세션 데이터의 예상치 못한 덮어 쓰기를 유발할 수 있습니다. 3) Session_status ()를 사용하여 반복 통화를 피하기 위해 세션 상태를 확인하십시오.

Nginx와 Apache는 각각 고유 한 장점과 단점이 있으며 선택은 특정 요구에 기초해야합니다. 1.NGINX는 비동기 비 블로킹 아키텍처로 인해 높은 동시 시나리오에 적합합니다. 2. Apache는 모듈 식 설계로 인해 복잡한 구성이 필요한 저소성 시나리오에 적합합니다.

AI는 작곡가 사용을 최적화하는 데 도움이 될 수 있습니다. 특정 방법에는 다음이 포함됩니다. 1. 종속성 관리 최적화 : AI는 종속성을 분석하고 최상의 버전 조합을 권장하며 충돌을 줄입니다. 2. 자동화 된 코드 생성 : AI는 모범 사례를 준수하는 composer.json 파일을 생성합니다. 3. 코드 품질 향상 : AI는 잠재적 인 문제를 감지하고 최적화 제안을 제공하며 코드 품질을 향상시킵니다. 이러한 방법은 기계 학습 및 자연어 처리 기술을 통해 구현되어 개발자가 효율성과 코드 품질을 향상시킬 수 있도록 도와줍니다.

Laravel10의 최신 버전은 MySQL 5.7 이상, PostgreSQL 9.6 이상, SQLite 3.8.8 이상, SQLServer 2017 이상과 호환됩니다. 이러한 버전은 JSON 데이터 유형 MySQL5.7과 같은 Laravel의 ORM 기능을 지원하여 쿼리 및 스토리지 효율성을 향상시키기 때문에 선택됩니다.

Laravel과 YII의 주요 차이점은 설계 개념, 기능적 특성 및 사용 시나리오입니다. 1. Laravel은 개발의 단순성과 즐거움에 중점을두고 Eloquentorm 및 Artisan 도구와 같은 풍부한 기능을 제공하며 빠른 개발 및 초보자에게 적합합니다. 2.YII는 성능과 효율성을 강조하고, 고 부하 애플리케이션에 적합하며, 효율적인 Activerecord 및 캐시 시스템을 제공하지만 가파른 학습 곡선이 있습니다.

session_start () iscrucialinphpformanagingUsersessions.1) itiniteSanewsessionifnoneexists, 2) ResumesAnxistessions, and3) setSasessionCookieForContInuityAcrosrequests, enablingplicationsirecationSerauthenticationAndpersonalizestContent.

HTML5는 5 가지 주요 개선 사항을 제공합니다. 1. 시맨틱 태그는 코드 선명도 및 SEO 효과를 향상시킵니다. 2. 멀티미디어 지원은 비디오 및 오디오 임베딩을 단순화합니다. 3. 형태 향상은 검증을 단순화한다. 4. 오프라인 및 로컬 스토리지는 사용자 경험을 향상시킵니다. 5. 캔버스 및 그래픽 기능은 웹 페이지의 시각화를 향상시킵니다.

MySQL 기능은 데이터 처리 및 계산에 사용될 수 있습니다. 1. 기본 사용에는 문자열 처리, 날짜 계산 및 수학 연산이 포함됩니다. 2. 고급 사용에는 복잡한 작업을 구현하기 위해 여러 기능을 결합하는 것이 포함됩니다. 3. 성능 최적화를 위해서는 WHERE 절에서 기능 사용 및 GroupBy 및 임시 테이블 사용을 피해야합니다.
