{"id":23114069,"url":"https://github.com/abkarim/lamp-setup","last_synced_at":"2025-07-02T15:36:30.614Z","repository":{"id":130932239,"uuid":"573123043","full_name":"abkarim/lamp-setup","owner":"abkarim","description":"LAMP server setup","archived":false,"fork":false,"pushed_at":"2022-12-31T21:46:47.000Z","size":231,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T00:29:06.364Z","etag":null,"topics":["apache2","htaccess","lamp-server","lamp-setup","mysql","webserver"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abkarim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-01T18:45:20.000Z","updated_at":"2023-07-02T04:28:55.000Z","dependencies_parsed_at":"2023-04-20T12:47:48.082Z","dependency_job_id":null,"html_url":"https://github.com/abkarim/lamp-setup","commit_stats":null,"previous_names":["abkarim/lamp-setup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abkarim/lamp-setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abkarim%2Flamp-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abkarim%2Flamp-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abkarim%2Flamp-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abkarim%2Flamp-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abkarim","download_url":"https://codeload.github.com/abkarim/lamp-setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abkarim%2Flamp-setup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263166828,"owners_count":23424252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache2","htaccess","lamp-server","lamp-setup","mysql","webserver"],"created_at":"2024-12-17T03:18:37.080Z","updated_at":"2025-07-02T15:36:30.583Z","avatar_url":"https://github.com/abkarim.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"#### A list of available languages.\n[en](./README.md) |\n\n#### Pages\n- [.htaccess](./HTACCESS.md)\n- [setup php](./SETUP-PHP.md)\n\n# Apache web server\nThe [Apache HTTP Server](https://www.apache.org/) is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation - `Wikipedia`\n\n## Install \n#### Debian\n\nopen terminal and enter this command\n```\nsudo apt install apache2\n```\n\n## Start, Stop and Restart\nI'm using service command. To install service use `sudo apt install sysvinit-utils`\n\u003cbr /\u003e\n\n**Start**\n```\nservice apache2 start\n```\nOpen browser and type `localhost` to access your server. You will see something like this.\n![apache default page](./images/apache-default-page.png)\n\n\u003cbr /\u003e  \n\n**Stop**\n```\nservice apache2 stop\n```\n\n**Restart**  \u003cbr /\u003e\n*Every time you edit something in apache configuration file you need to restart it.*\n```\nservice apache2 restart\n```\n\n## Port\nBy default apache2 use port `80`. Change file content here `/etc/apache2/ports.conf`. The first `Listen 80` is default port. Apache will only listen port that is listed in this file. In this case just `80`. To listen more port just add `Listen {port}` next to `Listen 80`\n```\n# If you just change the port or add more ports here, you will likely also\n# have to change the VirtualHost statement in\n# /etc/apache2/sites-enabled/000-default.conf\n\nListen 80\n\n//...\n```\n\n## Directory\nDirectory configurations file is located here `/etc/apache2/sites-enabled/000-default.conf`\n\n### Change root directory\nBy default apache use port `80`, so we need to change port `80` configuration. If you changed default port then edit that port instead of `80`.\n```\n//...\n\u003cVirtualHost *:80\u003e\n        //...\n\n        ServerAdmin webmaster@localhost\n        DocumentRoot /var/www/html\n         \n        //...\n\u003c/VirtualHost\u003e\n//...\n```\n\n### Add directory with a new port\nHere I'm adding a path for port `8080` to store file like phpmyadmin, etc. \u003cbr /\u003e\n**1.** Just duplicate port `80` configuration and replace port `80` with `8080` and changed Document root. In this case I'm using `/var/www/other`. \u003cbr /\u003e\n**2.** Add [port](#port) 8080 to `ports.conf`\n```\n//...\n\u003cVirtualHost *:80\u003e\n  //...\n\u003c/VirtualHost\u003e\n\n\n\u003cVirtualHost *:8080\u003e\n \n  ServerAdmin webmaster@localhost\n  DocumentRoot /var/www/other\n\n  ErrorLog ${APACHE_LOG_DIR}/error.log\n  CustomLog ${APACHE_LOG_DIR}/access.log combined\n\n\u003c/VirtualHost\u003e\n```\n\u003cbr /\u003e\n\n**Please feel free to add something or translate it into your native language.** The contribution guidelines can be found [here](./CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabkarim%2Flamp-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabkarim%2Flamp-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabkarim%2Flamp-setup/lists"}