-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the ft_server wiki!
# Build a docker image from a Dockerfile
docker build -t <your image name> <your Dockerfile dir>
# Start an instance of a docker image
docker run -it <your image name>
# Really important if you want to bind some ports on the container to your own computer, use -p option.
# Example for an Apache image first 80 means is local port, second 80 means container port
docker run -it debian:apache -p 80:80
# Enter running container
docker exec -it <ID or container name> bash
# See all images
docker images
# Remove images
docker rmi <image>
# docker rmi $(docker images -aq)
# Remove a container
$ docker rm <ID or container name>
# See running containers
docker ps
# List all docker containers (running and stopped).
docker ps -a
# Stop a container
docker kill <ID or container name>
# Delete all unused Docker images and cache and free space
docker system prune
/etc/nginx/sites-available/* Extra virtual host configuration files
/etc/nginx/sites-enabled/* Symlink to sites-available/<file> to enable vhost
MariaDB (database system) installed to store and manage data for your site, some Linux distributions (including Debian) use MariaDB as a drop-in replacement for MySQL Installation --> code
+--------------------+
f Database f
+--------------------+
f information_schema f
f mysql f
f new_database f
f performance_schema f
+--------------------+
4 rows in set (0.000 sec)
Checking connection between MySQL and phpMyAdmin: Testing Database Connection from PHP code
Checking connection between MySQL/phpMyAdmin with WordPress: wordpress database
Exporting database and Connecting my database to wordpress. This way I see the page when going to http://localhost/wordpress
and not wordpress config
http://localhost/wordpress/wp-admin
to modify
(Not at final version) Commit
- Autoindex-error
- autoindex off-error 403 "Without autoindex option you should be getting Error 403 for requests that end with / on directories that do not have an index.html file. With autoindex on you should be getting a simple listing"
Autoindex ON
Autoindex OFF
By ARG: Commit
docker build -t ft_server . --build-arg autoindex=off
By ENV:
docker run --env AUTOINDEX=off --name ft_server -d -p 443:443 -p 80:80 ft_server
server_tokens off;
Config to not show nginx version
Verifying if the server is running with an autoindex which can be desactivated when the container is launched (via an environment variable)
If your page is not loading or throwing an error. Inspect:
cat /var/log/nginx/access.log
cat /var/log/nginx/error.log
To see all running services:
service --status-all
http://localhost/
http://localhost/pypmyadmin
http://localhost/wordpress