{"_id":"5a1db098b15d1b001ebc5f05","category":{"_id":"5a1db098b15d1b001ebc5ef4","version":"5a1db098b15d1b001ebc5ef2","project":"54e7fca9e6e77d1900ed11f0","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-25T01:54:38.235Z","from_sync":false,"order":1,"slug":"tutorials","title":"Tutorials"},"project":"54e7fca9e6e77d1900ed11f0","user":"54e7ff93c1c5e90d0048bd92","parentDoc":null,"version":{"_id":"5a1db098b15d1b001ebc5ef2","project":"54e7fca9e6e77d1900ed11f0","__v":1,"createdAt":"2017-11-28T18:53:12.270Z","releaseDate":"2017-11-28T18:53:12.270Z","categories":["5a1db098b15d1b001ebc5ef3","5a1db098b15d1b001ebc5ef4","5a1db098b15d1b001ebc5ef5","5a1db098b15d1b001ebc5ef6"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.2.0","version":"1.2"},"githubsync":"","__v":2,"updates":["5af6082e426c9d000377c1b4","5b707cea22cd8400034a24e7"],"next":{"pages":[],"description":""},"createdAt":"2016-08-27T19:17:29.156Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"[block:api-header]\n{\n  \"title\": \"Generating the Configuration Automatically\"\n}\n[/block]\nIf the PufferPanel installer did not automatically create the needed configuration files for Apache, use the following commands as root to automatically generate them\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"cd /srv/pufferpanel\\n./pufferpanel addapache\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nOtherwise, follow the instructions below to manually create the configuration.\n[block:api-header]\n{\n  \"title\": \"Creating the Configuration Manually\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"CAUTION\",\n  \"body\": \"This documentation is incomplete and may not be completely accurate. Please consult the Apache documentation for any problems using this.\"\n}\n[/block]\nThis documentation assumes you have Apache/Httpd installed. If you do not, please consult apache's documentation or the many tutorials on installing a LAMP server.\n\nFirst, you must locate your root configuration for Apache/Httpd (generally */etc/httpd/httpd.config* or */etc/apache2/apache2.conf*). In that file, change/append the following.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"DocumentRoot /srv/pufferpanel/public\\n<Directory \\\"/srv/pufferpanel/public\\\">\\n    AllowOverride All\\n    Order Allow,Deny\\n    Allow from all\\n    Require all granted\\n</Directory>\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nNext, you must edit your vhost config most likely located at /etc/apache2/sites-available/000-default.conf if you aren't running any other sites, or you create another conf like pufferpanel.conf and save it there if you run multiple websites.\n\nTo create the conf file, you can just `nano /etc/apache2/sites-available/pufferpanel.conf`\nThen insert the following code into the file and save:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<VirtualHost *:80>\\n        #ServerName www.example.com\\n        DocumentRoot /srv/pufferpanel/public\\n</VirtualHost>\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nIf you are running multiple sites and the above code is in pufferpanel.conf, you MUST uncomment the ServerName line and set it to the domain you will use to connect to the panel. If you only run one site, the above code should replace everything in your 000-default.conf file.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you are receiving \\\"500 Bad Request\\\" error, make sure to enable mod rewrite!\\nType `sudo a2enmod rewrite` in your terminal following it with `sudo service apache2 restart`\"\n}\n[/block]","excerpt":"","slug":"apache-configuration","type":"basic","title":"Apache Configuration"}

Apache Configuration


[block:api-header] { "title": "Generating the Configuration Automatically" } [/block] If the PufferPanel installer did not automatically create the needed configuration files for Apache, use the following commands as root to automatically generate them [block:code] { "codes": [ { "code": "cd /srv/pufferpanel\n./pufferpanel addapache", "language": "text" } ] } [/block] Otherwise, follow the instructions below to manually create the configuration. [block:api-header] { "title": "Creating the Configuration Manually" } [/block] [block:callout] { "type": "danger", "title": "CAUTION", "body": "This documentation is incomplete and may not be completely accurate. Please consult the Apache documentation for any problems using this." } [/block] This documentation assumes you have Apache/Httpd installed. If you do not, please consult apache's documentation or the many tutorials on installing a LAMP server. First, you must locate your root configuration for Apache/Httpd (generally */etc/httpd/httpd.config* or */etc/apache2/apache2.conf*). In that file, change/append the following. [block:code] { "codes": [ { "code": "DocumentRoot /srv/pufferpanel/public\n<Directory \"/srv/pufferpanel/public\">\n AllowOverride All\n Order Allow,Deny\n Allow from all\n Require all granted\n</Directory>", "language": "text" } ] } [/block] Next, you must edit your vhost config most likely located at /etc/apache2/sites-available/000-default.conf if you aren't running any other sites, or you create another conf like pufferpanel.conf and save it there if you run multiple websites. To create the conf file, you can just `nano /etc/apache2/sites-available/pufferpanel.conf` Then insert the following code into the file and save: [block:code] { "codes": [ { "code": "<VirtualHost *:80>\n #ServerName www.example.com\n DocumentRoot /srv/pufferpanel/public\n</VirtualHost>", "language": "text" } ] } [/block] If you are running multiple sites and the above code is in pufferpanel.conf, you MUST uncomment the ServerName line and set it to the domain you will use to connect to the panel. If you only run one site, the above code should replace everything in your 000-default.conf file. [block:callout] { "type": "info", "body": "If you are receiving \"500 Bad Request\" error, make sure to enable mod rewrite!\nType `sudo a2enmod rewrite` in your terminal following it with `sudo service apache2 restart`" } [/block]