导航:首页 > 操作系统 > apachehttplinux

apachehttplinux

发布时间:2022-11-21 23:38:59

❶ 如何更改linux下的Apache http端口号

您好,请先查找到Apache相关配置文件的目录,假设如下:
服务目录 /etc/httpd
配置文件 /etc/httpd/conf/httpd.conf
访问日志 /var/log/httpd/access_log
错误日志 /var/log/httpd/error_log

可通过修改配置文件:/etc/httpd/conf/httpd.conf

listen字段表示监听的IP和端口号。

以上资料来自《Linux就该这么学》第九章,使用Apache服务部署静态网站。

❷ 如何更改linux下的Apache http端口号

你可以根据Apache的安装路径找其配置文件,比如说我的配置文件路径就在/usr/local/apache2/conf/httpd.conf,你可以修改listen 80这一行,改成你想要的端口号

❸ linux下apache 怎么把 http改为https

Gworg证书解压后根据以下配置:
Apache SSL配置
Listen 443 (如果配置已经存在就不要加)
LoadMole ssl_mole moles/mod_ssl.so (如果配置已经存在就不要加)
NameVirtualHost *:443 (非必须,配置多个SSL站点会需要)
<VirtualHost *:443>
ServerName www.gworg.cn
ServerAlias gworg.cn
DocumentRoot /var/www/html
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateFile /etc/ssl/server.crt
SSLCertificateKeyFile /etc/ssl/server.key
SSLCertificateChainFile /etc/ssl/server.ca-bundle
</VirtualHost>

❹ linux中如何重新启动httpd服务。

1、首先打开linux的终端,输入指令“rpm -qa | grep http”查看本机Linux是否安装了httpd。

❺ 如何更改linux下的Apache http端口号

使用vim编辑Apache http的配置文件:

[root@Linuxprobe ~]# vim /etc/httpd/conf/httpd.conf
前文省略……………………………………
ServerRoot "/etc/httpd"
32
33 #
34 # Listen: Allows you to bind Apache to specific IP addresses and/or
35 # ports, instead of the default. See also the <VirtualHost>
36 # directive.
37 #
38 # Change this to Listen on specific IP addresses as shown below to
39 # prevent Apache from glomming onto all bound IP addresses.
40 #
41 #Listen 12.34.56.78:80
42 Listen 80 #这是Apache的默认监听端口,修改你想要修改的端口就可以了
43
44 #
45 # Dynamic Shared Object (DSO) Support
46 #
47 # To be able to use the functionality of a mole which was built as a DSO you
:wq #退出并保存
2.使用重新启动httpd服务:systemctl restart httpd (PS:这里使用的是RHEL 7.0系统)如果是7以下的系统,这里有详细介绍Apache的配置服务http://www.linuxprobe.com/chapter-09/。或者可以使用service httpd restart重启即可。

[root@Linuxprobe ~]# systemctl restart httpd
[root@Linuxprobe ~]#

❻ 如何更改linux下的Apache http端口号

使用vim编辑Apache http的配置文件:

[root@Linuxprobe ~]# vim /etc/httpd/conf/httpd.conf
前文省略……………………………………
ServerRoot "/etc/httpd"
 32 
 33 #
 34 # Listen: Allows you to bind Apache to specific IP addresses and/or
 35 # ports, instead of the default. See also the <VirtualHost>
 36 # directive.
 37 #
 38 # Change this to Listen on specific IP addresses as shown below to 
 39 # prevent Apache from glomming onto all bound IP addresses.
 40 #
 41 #Listen 12.34.56.78:80
 42 Listen 80     #这是Apache的默认监听端口,修改你想要修改的端口就可以了
 43 
 44 #
 45 # Dynamic Shared Object (DSO) Support
 46 #
 47 # To be able to use the functionality of a mole which was built as a DSO you
 :wq      #退出并保存

2.使用重新启动httpd服务:systemctl  restart httpd (PS:这里使用的是RHEL 7.0系统)如果是7以下的系统,这里有详细介绍Apache的配置服务http://www.linuxprobe.com/chapter-09/。或者可以使用service httpd restart重启即可。

[root@Linuxprobe ~]# systemctl restart httpd
[root@Linuxprobe ~]#

❼ 如何更改linux下的Apache http端口号

---
httpd.conf配置请参照下面
#vi /etc/httpd/conf/httpd.conf
以下展示的是学新公园对默认值的修改。
#禁止显示apache版本号
ServerTokens ProctOnly
ServerSignature Off
#端口监听,我们将*改成了我们的独立ip
Listen *:80
#我们开启了两个模块,其他模块默认设置
mod_rewrite.so #开启.htaccess需要
mod_vhost_alias.so #设置虚拟机需要
#我们将ServerAdmin改成我们自己的邮箱。
ServerAdmin [email protected]
#我们将ServerName导向固定ip,即将*改成我们的ip
ServerName *:80
#我们修改了DocumentRoot目录
DocumentRoot /***
#将Options属性改成FollowSymLinks
Options FollowSymLinks
#将AllowOverride属性改成ALL以支持.htaccess
AllowOverride ALL
#我们配置了虚拟机,我们把*更改成我们的ip
NameVirtualHost *:80
#虚拟机上拒绝了直接通过ip访问我们的站点,我们把*更改成我们的ip
<VirtualHost *:80

❽ 如何更改linux下的Apache http端口号

# vi /etc/httpd/conf/httpd.conf 文件

修改两个地方
#Listen 12.34.56.78:80
Listen 80
#把80改为你设置的端口,我设置端口为82
Listen 82

NameVirtualHost *:80
#把80改为你设置的端口,我设置端口为82
NameVirtualHost *:82

保存修改,退出。

//如果没有semanage命令,则执行:
# yum -y install policycoreutils-Python

# semanage port -a -t http_port_t -p tcp 5555 #输入这个命令 要不httpd 会启动失败
# /etc/rc.d/init.d/httpd start #启动httpd

❾ 如何更改linux下的Apache http端口号

你好,
Apache的端口号是在其目录下的 httpd.conf这个文件中设置的。

Apache是跨平台的软件,在linux/windows/unix下都有相应的版本。

找到apache目录下的httpd.conf, 使用vi打开,找到port=80 这一行,把80改成在此服务器上没有用到的端口号,保存退出。

然后重新启动apache进程即可。

如果你用rpm包安装的apache,那么你的主配置文件应该是在/etc/httpd/conf/httpd.conf这里;
如果你用tar包安装的apache,那么应该在你apache安装目录下的conf/httpd.conf这里;
如果apache是在/usr/local/apache2安装的,那么主配置文件就在/usr/local/apache2/conf/httpd.conf这里.

❿ Linux中的Apache部署http服务出现的问题

你的问题描述太简单了。很多情况都不清楚,所以没法回答。1. 你的apache后面跟着的是什么?是php还是别的?怎么配置的?2. 什么叫apache配置文件没问题?你检查了哪几项?apache 能 running不代表就没问题。3. 1和2没搞清楚,没法回答。

阅读全文

与apachehttplinux相关的资料

热点内容
dvd光盘存储汉子算法 浏览:757
苹果邮件无法连接服务器地址 浏览:963
phpffmpeg转码 浏览:671
长沙好玩的解压项目 浏览:145
专属学情分析报告是什么app 浏览:564
php工程部署 浏览:833
android全屏透明 浏览:737
阿里云服务器已开通怎么办 浏览:803
光遇为什么登录时服务器已满 浏览:302
PDF分析 浏览:485
h3c光纤全工半全工设置命令 浏览:143
公司法pdf下载 浏览:382
linuxmarkdown 浏览:350
华为手机怎么多选文件夹 浏览:683
如何取消命令方块指令 浏览:349
风翼app为什么进不去了 浏览:778
im4java压缩图片 浏览:362
数据查询网站源码 浏览:150
伊克塞尔文档怎么进行加密 浏览:892
app转账是什么 浏览:163