You were asking how to open a port in the firewall in your original post, that is done through a init script on Rhel6, that would look something like this.
By default httpd starts on port 80 if you also want httpd to listen on a different port you have to edit the main config file -> /etc/httpd/conf/httpd.conf There is a line with port 80 on it that looks like this.
Code:
Listen 80
You will have to add the line to it that it also listens on 8043 so that it then looks like this.
Code:
Listen 80
Listen 8043
You then have to restart httpd.
Code:
/etc/init.d/httpd restart
Are you doing this to learn or for some other reason that you are trying to set this up?
root@cpnet ~]# cd /etc/init.d/ httpd start
[root@cpnet init.d]#
------------------------------------------------
vim conf/httpd.conf
Listen 80
Listen 8043
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network) E45: 'readonly' option is set (add ! to override)
----------------------------------------------------
Problem readonly !!! must resolve that allow me put the /etc/init.d/httpd restart
for two first commands work BUT i have a problem for this command:
[root@cpnet init.d]# httpd restart
Usage: httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
you say me :
ou then have to restart httpd.
Code:
/etc/init.d/httpd restart
The only thing I can think of is that there is an error in the init scrip that got accidently written there, can you first try running the following and share the output.
The only other thing I can think of is that the init script accidentally got edited or something like that. Remove httpd and then install it again and then see what happens when when you try to start or restart httpd.