Skip to main content

Create Domain in Localhost on Apache2

Project description

## Apache Local Domain
Create Local Domain for Apache Web Service

#### Description
Create own Domain on Your Local System

#### Installation

##### Debian Base Distros (Debian,Ubuntu,...)
python3 -m pip install -U Apache-Local-Domain

##### Other Distros (Arch , Fedora , ...)
$ git clone https://gitlab.com/toys-projects/Apache-Local-Domain.git
$ cd Apache-Local-Domain
$ python3 setup.py --help customize_configs
...
Options for 'CustomizeConfigurations' command:
--debug-mode (-d) Debug mode [False]
--apache-modules-path (-m) Apache Modules Path
[/etc/apache2/mods-enabled/]
--hosts (-h) Hosts file [/etc/hosts]
--virtual-hosts-available-path (-a) VirtualHosts available Path
[/etc/apache2/sites-available/]
--virtual-hosts-enabled-path (-v) VirtualHosts Enabled Path
[/etc/apache2/sites-enabled/]
--extension (-e) VirtualHosts extension [.conf]
...
##### example Customize Configuration
$ python3 setup.py customize_configs \
--debug-mode False \
-m /etc/httpd/modules/ \
-a /etc/httpd/vhosts-available/ \
-v /etc/httpd/vhosts-enabled/ \
-e .dom

after of Generate New file Configuration Complete , run:

$ sudo python3 setup.py install

#### Usage 1
$ apacheld --help
Usage: apacheld [OPTIONS] COMMAND [ARGS]...

Options:
--help Show this message and exit.

Commands:
php Initialize PHP Template
wsgi Initialize WSGI Template

##### Usage 2
$ apacheld wsgi --help
Usage: apacheld wsgi [OPTIONS]

Initialize WSGI Template

Options:
-d, --domain TEXT This Domain is Created (ServerName) ,
example: example.com [required]
-r, --root TEXT DocumentRoot of Your website (DocumentRoot)
, example: /srv/http/MyWebSite/ [required]
-w, --wsgiscript TEXT WSGIScriptAlias of Your website
(WSGIScriptAlias) , example:
/srv/http/MyWebSite/wsgi.py [required]
-v, --virtualenv-folder-name TEXT
Virtualenv Folder name in Project PATH
(default: .venv) [required]
-e, --email TEXT Your Email (ServerAdmin) , example:
example@example.com
--http2 Enable HTTP2 Protocol
--enable-static Enable using static files
-s, --static-folder-name TEXT static folder name in Project PATH (default:
static) [required with enable_static]
--help Show this message and exit.

##### Usage 3
$ apacheld php --help
Usage: apacheld php [OPTIONS]

Initialize PHP Template

Options:
-d, --domain TEXT This Domain is Created (ServerName) , example:
example.com [required]
-r, --root TEXT DocumentRoot of Your website (DocumentRoot) , example:
/srv/http/MyWebSite/ [required]
-e, --email TEXT Your Email (ServerAdmin) , example: example@example.com
--http2 Enable HTTP2 Protocol
--help Show this message and exit.

#### Note
* To use This Program You should Run it with `sudo`

#### TODO
- [x] Check enable http2 module or not
- [x] add new Validations for inputs (documentroot , wsgiscript , virtualenv ,...)
- [ ] link Configure file to /etc
- [ ] Builtin sudo Execute


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Apache-Local-Domain-1.1.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

Apache_Local_Domain-1.1.2-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file Apache-Local-Domain-1.1.2.tar.gz.

File metadata

  • Download URL: Apache-Local-Domain-1.1.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.8.1 pkginfo/1.2.1 requests/2.12.4 setuptools/33.1.1 requests-toolbelt/0.7.0 clint/0.5.1 CPython/3.5.3 Linux/4.9.0-6-amd64

File hashes

Hashes for Apache-Local-Domain-1.1.2.tar.gz
Algorithm Hash digest
SHA256 99dda4a0fa99618950d226d50a4f68c8de5eb02297ce2af6795432a2dad7eeeb
MD5 2e640b6571144c5d4ed809f24e1cd764
BLAKE2b-256 93591ede2b4a92999805e0d783ed9d57e8861dbbb8d50035a4cd8917d60e1c16

See more details on using hashes here.

File details

Details for the file Apache_Local_Domain-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: Apache_Local_Domain-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.8.1 pkginfo/1.2.1 requests/2.12.4 setuptools/33.1.1 requests-toolbelt/0.7.0 clint/0.5.1 CPython/3.5.3 Linux/4.9.0-6-amd64

File hashes

Hashes for Apache_Local_Domain-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b6c8ae1ffdd2daab832f907832b5fdbbd66e0015f386e31587a4e568aef531a3
MD5 bfe7696648a326f60859188763d30876
BLAKE2b-256 cde1fd3cbda2c60544fe5efe5f5c7bb48bd18bf00c72ab7389849fa0748bd177

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page