-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (127 loc) · 6.46 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Laravel 5.1|5.2|5.3|5.4|5.5|5.* App setup on Linux">
<meta name="keywords" content="Laravel, Server, Setup, 5.5, 5.6, Ubuntu, Linux, LEMP, NGINX">
<meta name="author" content="Masiur Rahman Siddiki">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<title>InfancyIT || Laravel 5.* setup On LEMP Server</title>
</head>
<body>
<!-- Setup by Masiur Rahman Siddiki -->
<!-- Setup by mrsiddiki AT gmail DOT com -->
<!-- For https://infancyit.com -->
<!-- Gratitude to Abu Shahriar Ratul-->
<!-- Gratitude to Md Abu Talha -->
<!-- 7:52 PM
Friday, February 16, 2018 (GMT+6)
Time in Sylhet
2nd update
10:58 AM
Saturday, February 17, 2018 (GMT+6)
Time in Sylhet
-->
<div class="container">
<div id="app">
<h2 align=center>Laravel 5.* setup On LEMP Server</h2>
<h5 align=center>Powered By: <b>InfancyIT</b></h5>
<h5 align=center><a href="http://scdnlab.com/vps">Click For LAMP</a></h5>
<p align=center><i class="icon-copy"></i> icon indicates Copy to Clipboard</p>
<br>
<div class="row">
<div class="col-md-5">
<h4 align=center>Domain Name<input v-model.trim="domain_name" placeholder="example.com" class="form-control" type="text" ></h4>
</div>
<div class="col-md-6 col-md-offset-1">
<h4 align=center>Git URL</br> <input placeholder="http://example.com.git" class="form-control" type="text" v-model="git_url"></h4>
</div>
</div>
<p>Execute the Steps serially</p>
<ol class="list-group">
<li><h5><code id="c1">sudo apt-get update</code> <i class="icon-copy" onclick="copyToClipboard('#c1')"></i></h5></li>
<li><h5><code id="c2">sudo mkdir -p /var/www/html/{{ domain_name }}</code> <i class="icon-copy" onclick="copyToClipboard('#c2')"></i></h5></li>
<li><h5><code id="c3">sudo chown -R $USER:$USER /var/www/html/{{domain_name}}</code> <i class="icon-copy" onclick="copyToClipboard('#c3')"></i></h5></li>
<li><h5><code id="c4">cd /var/www/html/{{domain_name}}</code> <i class="icon-copy" onclick="copyToClipboard('#c4')"></i></h5></li>
<li><h5><code id="c5">git clone {{git_url}} && cd {{git_repo}} && composer update</code> <i class="icon-copy" onclick="copyToClipboard('#c5')"></i></h5></li>
<li><h5>Go to <a v-bind:href="url_p" target="_blank">phpmyadmin</a> or your database host and create a database name: {{git_repo}} </h5></li>
<li><h5><code id="c10">sudo cp .env.example .env && nano .env</code> <i class="icon-copy" onclick="copyToClipboard('#c10')"></i></h5></li>
<li><h5>set database as {{git_repo}} and also the password</h5></li>
<li><h5><code id="c9">php artisan migrate --seed</code> <i class="icon-copy" onclick="copyToClipboard('#c9')"></i></h5></li>
<li><h5><code id="c6">sudo chgrp -R www-data storage bootstrap/cache</code> <i class="icon-copy" onclick="copyToClipboard('#c6')"></i></h5></li>
<li><h5><code id="c7">sudo chmod -R ug+rwx storage bootstrap/cache</code> <i class="icon-copy" onclick="copyToClipboard('#c7')"></i></h5></li>
<li><h5><code id="c11">sudo nano /etc/nginx/sites-available/{{domain_name}}</code> <i class="icon-copy" onclick="copyToClipboard('#c11')"></i></h5></li>
<li><h5>Paste the following code. </h5>
<xmp>
server {
listen 80;
listen [::]:80;
root /var/www/html/{{domain_name}}/{{git_repo}}/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name {{domain_name}} www.{{domain_name}};
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
</xmp>
</li>
<li><h5><code id="c13">sudo ln -s /etc/nginx/sites-available/{{domain_name}} /etc/nginx/sites-enabled/ && sudo systemctl reload nginx</code> <i class="icon-copy" onclick="copyToClipboard('#c13')"></i></h5></li>
<li><h5><code id="c15">cd /var/www/html/{{domain_name}}/{{git_repo}}/</code> <i class="icon-copy" onclick="copyToClipboard('#c15')"></i></h5></li>
<li><h5><code id="c16">sudo chmod -R 777 storage && sudo chmod -R 777 public && sudo chmod -R 777 bootstrap/cache</code> <i class="icon-copy" onclick="copyToClipboard('#c16')"></i></h5></li>
<li><h5>Finally Check if the site is okay ! ~~ <a v-bind:href="base_url" target="_blank">{{domain_name}}</a></h5></li>
</ol>
</div>
<footer>
<div align="center">
<div >
<small class="copyright">InfancyIT ©2018 Sylhet, Bangladesh</small>
</div>
</div>
</footer>
</div>
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<!--<script src="vue.js"></script>-->
<script>
var app = new Vue({
el: '#app',
data: {
domain_name : '',
git_url : ''
},
computed: {
git_repo: function (git_url) {
let rev = this.git_url.split('/');
rev = rev.reverse()[0];
return rev.split('.')[0];
},
url_p: function(domain_name) {
return 'http://' + this.domain_name + '/phpmyadmin';
},
base_url: function (domain_name) {
return 'http://'+this.domain_name;
}
}
})
$(document).ready(function() {
$('li').click(function(){
$(this).addClass("bg-success");
});
});
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}
</script>
</body>
</html>