-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
change-phpmyadmin-default-visit-port.html
248 lines (213 loc) · 12.2 KB
/
change-phpmyadmin-default-visit-port.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html>
<html lang="zh-hans" prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml" class="han-init">
<head>
<title>更改 phpMyAdmin 默认访问端口(apache2) - Mozillazg's Blog</title>
<!-- Using the latest rendering mode for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://mozillazg.com/favicon.ico" rel="icon">
<link rel="canonical" href="https://mozillazg.com/2013/02/change-phpmyadmin-default-visit-port.html">
<meta name="author" content="mozillazg" />
<meta name="keywords" content="phpmyadmin,mysql,ubuntu" />
<meta name="description" content="将访问 phpMyAdmin 的端口从默认的 80 改为 8081 。 本文的 phpmyadmin 目录:/var/www/phpmyadmin/ 编辑 apache 配置文件: # vi /etc/apache2/sites-available/phpmyadmin <VirtualHost *:8081> ServerName 127.0.0.1 DocumentRoot /var/www/phpmyadmin </VirtualHost> 配置 apache 监听 8081 端口: # vi /etc/apache2/ports.conf # 添加 NameVirtualHost *:8081 Listen 8081 重启 apache 服务 ..." />
<meta property="og:site_name" content="Mozillazg's Blog" />
<meta property="og:type" content="article"/>
<meta property="og:title" content="更改 phpMyAdmin 默认访问端口(apache2)"/>
<meta property="og:url" content="https://mozillazg.com/2013/02/change-phpmyadmin-default-visit-port.html"/>
<meta property="og:description" content="将访问 phpMyAdmin 的端口从默认的 80 改为 8081 。 本文的 phpmyadmin 目录:/var/www/phpmyadmin/ 编辑 apache 配置文件: # vi /etc/apache2/sites-available/phpmyadmin <VirtualHost *:8081> ServerName 127.0.0.1 DocumentRoot /var/www/phpmyadmin </VirtualHost> 配置 apache 监听 8081 端口: # vi /etc/apache2/ports.conf # 添加 NameVirtualHost *:8081 Listen 8081 重启 apache 服务 ..."/>
<meta property="article:published_time" content="2013-02-27" />
<meta property="article:section" content="others" />
<meta property="article:tag" content="phpmyadmin" />
<meta property="article:tag" content="mysql" />
<meta property="article:tag" content="ubuntu" />
<meta property="article:author" content="mozillazg" />
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@mozillazg">
<meta name="twitter:creator" content="@mozillazg">
<meta name="twitter:domain" content="https://mozillazg.com">
<!-- Bootstrap -->
<link rel="stylesheet" href="https://mozillazg.com/theme/css/bootstrap.min.css" type="text/css"/>
<link href="https://mozillazg.com/theme/css/font-awesome.min.css" rel="stylesheet">
<link href="https://mozillazg.com/theme/css/pygments/github.css" rel="stylesheet">
<link rel="stylesheet" href="https://mozillazg.com/theme/css/style.css" type="text/css"/>
<link href="https://mozillazg.com/static/custom.css" rel="stylesheet">
<link href="https://mozillazg.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate"
title="Mozillazg's Blog ATOM Feed"/>
<link href="https://mozillazg.com/feeds/all.rss.xml" type="application/rss+xml" rel="alternate"
title="Mozillazg's Blog RSS Feed"/>
<link href="https://mozillazg.com/feeds/others.atom.xml" type="application/atom+xml" rel="alternate"
title="Mozillazg's Blog others ATOM Feed"/>
</head>
<body>
<div class="navbar" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="https://mozillazg.com/" class="navbar-brand">
Mozillazg's Blog </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="/index.html">Home</a></li>
<li><a href="https://mozillazg.com/feeds/all.atom.xml">Feed</a></li>
<li><a href="https://mozillazg.com/2014/10/pages/about-me.html">
About me
</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://mozillazg.com/archives.html"><i class="fa fa-th-list"></i><span class="icon-label">Archives</span></a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar -->
<!-- Banner -->
<!-- End Banner -->
<div class="container">
<div class="row">
<div class="col-lg-12">
<section id="content" class="yue">
<article>
<header class="text-center">
<h1>
<a href="https://mozillazg.com/2013/02/change-phpmyadmin-default-visit-port.html"
rel="bookmark"
title="Permalink to 更改 phpMyAdmin 默认访问端口(apache2)">
更改 phpMyAdmin 默认访问端口(apache2)
</a>
</h1>
<p class="published">
<time datetime="2013-02-27T00:00:00+00:00">
2013-02-27
</time>
</p>
</header>
<div class="entry-content">
<div class="well-sm article-info">
<footer class="post-info">
<a href="https://mozillazg.com/category/others.html">others</a>
<span class="label label-default hide">Tags</span>
<a href="https://mozillazg.com/tag/phpmyadmin.html">phpmyadmin</a>
/
<a href="https://mozillazg.com/tag/mysql.html">mysql</a>
/
<a href="https://mozillazg.com/tag/ubuntu.html">ubuntu</a>
</footer><!-- /.post-info --> </div>
<div>
<p>将访问 phpMyAdmin 的端口从默认的 80 改为 8081 。</p>
<p>本文的 phpmyadmin 目录:<code>/var/www/phpmyadmin/</code></p>
<p>编辑 apache 配置文件:</p>
<div class="codehilite"><pre><span class="c"># vi /etc/apache2/sites-available/phpmyadmin</span>
<VirtualHost *:8081>
ServerName 127.0.0.1
DocumentRoot /var/www/phpmyadmin
</VirtualHost>
</pre></div>
<p>配置 apache 监听 8081 端口:</p>
<div class="codehilite"><pre><span class="c"># vi /etc/apache2/ports.conf</span>
<span class="c"># 添加</span>
NameVirtualHost *:8081
Listen 8081
</pre></div>
<p>重启 apache 服务:<code>service apache2 restart</code>,
现在可以通过 http://ip:8081/phpmyadmin/ 访问 phpMyAdmin 了。</p>
<h2 id="_1">参考</h2>
<ul>
<li><a href="http://ubuntuforums.org/showthread.php?t=1329607">PHPMyAdmin Port Change - Ubuntu Forums</a></li>
</ul>
</div>
</div>
<!-- /.entry-content -->
<section class="well" id="related-posts">
<p>Related Posts:</p>
<ul>
<li><a href="https://mozillazg.com/2013/06/mysql-master-master.html">mysql 基于 master-master 的双机热备配置</a></li>
<li><a href="https://mozillazg.com/2013/01/linux-vps-first-things-need-to-do.html">[linux]入手 VPS 后首先该做的事情</a></li>
<li><a href="https://mozillazg.com/2013/09/mysql-DatabaseError-1061-Duplicate-key-name.html">[MySQL]修复 DatabaseError: (1061, "Duplicate key name 'bar_xxx_uniq'") 错误</a></li>
<li><a href="https://mozillazg.com/2013/02/linux-fix-sendmail-configuration-error-feature-should-be-before-mailer.html">[linux]解决 sendmail 错误: FEATURE() should be before MAILER()</a></li>
<li><a href="https://mozillazg.com/2013/06/django-let-bigintegerfield-auto-increment.html">[django]让 BigIntegerField 字段自增长</a></li>
</ul>
</section>
<hr/>
<section class="comments" id="comments">
<h2>Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'my-github-blog'; // required: replace example with your forum shortname
var disqus_identifier = 'change-phpmyadmin-default-visit-port';
var disqus_url = 'https://mozillazg.com/2013/02/change-phpmyadmin-default-visit-port.html';
var disqus_config = function () {
this.language = "zh-hans";
};
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
</article>
</section>
</div>
</div>
</div>
<footer>
<div class="container">
<hr>
<div class="row">
<div class="col-xs-10">© 2016 mozillazg
· Powered by <a href="https://github.com/DandyDev/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>,
<a href="http://docs.getpelican.com/" target="_blank">Pelican</a>,
<a href="http://getbootstrap.com" target="_blank">Bootstrap</a> <p><small> <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="/static/images/by-sa-80x15.png" /></a>
"<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Mozillazg's Blog</span>" by <a xmlns:cc="http://creativecommons.org/ns#" href="https://mozillazg.com" property="cc:attributionName" rel="cc:attributionURL">mozillazg</a> is
licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>, except where indicated otherwise.
</small></p>
</div>
<div class="col-xs-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
</div>
</div>
</footer>
<script src="https://mozillazg.com/theme/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://mozillazg.com/theme/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="https://mozillazg.com/theme/js/respond.min.js"></script>
<!-- Disqus -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'my-github-blog'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script');
s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<!-- End Disqus Code -->
<!-- Google Analytics Universal -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-77172981-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics Universal Code -->
</body>
</html>