Skip to content

Egogorka/project-for-uit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

A small project

Software used:

  1. Nginx - 1.20.1
  2. PHP-8.0.11 Non Thread Safe (for Windows x64)
  3. MySQL Community Server 8.0.27 (for Windows x64

Project structure
web
├project
│ ├public
│ │ ├───js
│ │ └───css
│ └───scripts
├───php
├───nginx-1.20.1
└───mysql

Nginx configuration (nginx.conf)
"...." stand for the rest of the absolute path (!MUST BE RESPLACED!)
I run PHP-CGI on 9123 port, you can change it for 9000 - default one (if something goes wrong)

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;

		# Move the root file path to server block.
		root ..../web/project/public/;

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

		location ~ \.php$ {
			fastcgi_pass   127.0.0.1:9123;
			fastcgi_index  index.php;
			fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
			include        fastcgi_params;
		}

    }

}

PHP Configuration (php.ini, only the lines that were changed)
"...." stand for the rest of the absolute path

doc_root = ..../web/project/public

extension_dir = "ext"
enable_dl = On
cgi.force_redirect = 1
fastcgi.impersonate = 1
cgi.rfc2616_headers = 1

extension=php_gd2.dll
extension=curl
extension=gd
extension=mbstring
extension=exif     
extension=mysqli
extension=pdo_mysql

Also I added paths to mysql, php and nginx folders to PATH
To setup MySQL I created /data folder in mysql directory and used mysql --initialize

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published