Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
php_server [2025/10/29 02:13] – Added more to the setup directory MediocreMetastasisphp_server [2025/10/29 02:17] (current) MediocreMetastasis
Line 1: Line 1:
 ====== Setting up a server to run php code ====== ====== Setting up a server to run php code ======
  
-==== Download Docker ====+===== Download Docker =====
 Follow instructions on this page Follow instructions on this page
 [[https://docs.docker.com/get-started/get-docker/|Docker Installation]] [[https://docs.docker.com/get-started/get-docker/|Docker Installation]]
Line 11: Line 11:
 </code> </code>
  
-==== Set up Directory ====+===== Set up Directory =====
 Create the files and folders shown below Create the files and folders shown below
 <code -> <code ->
Line 21: Line 21:
 |-php.ini |-php.ini
 </code> </code>
 +
 public-html/ is self explanatory. It's all the files the user will be able to access. That being .php files, .html files, stylesheets and javascript code, ect. public-html/ is self explanatory. It's all the files the user will be able to access. That being .php files, .html files, stylesheets and javascript code, ect.
 +
 docker-compose.yml and DockerFile will hold the code to initialize the server. They're like a bash script. docker-compose.yml and DockerFile will hold the code to initialize the server. They're like a bash script.
 +
 php.ini is the config file for your php server. this let's you change parameters and enable extensions like sql. php.ini is the config file for your php server. this let's you change parameters and enable extensions like sql.
  
-==== Edit files ====+===== Edit files =====
  
 Edit the DockerFile and run this command: Edit the DockerFile and run this command:
Line 63: Line 66:
 You can also edit the 2 docker files to let you run a sql server alongside your web server. You can also edit the 2 docker files to let you run a sql server alongside your web server.
  
-==== Build and Activate Server ====+===== Build and Activate Server =====
  
 open up a terminal located in your directory and run these commands: open up a terminal located in your directory and run these commands:


php_server.1761700391.txt.gz · Last modified: by MediocreMetastasis
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International