How to give specific port to Apache in Ubuntu 12.04 and port for mysql
34,104
Simple , you can do it with listen command. I mean open your terminal with CTRL+ALT+T then type as
sudo gedit /etc/apache2/httpd.conf
Then make the line as
Listen 8000
save & close. restart your apache server. now your apache will start listening to port number 8000.
Related videos on Youtube
Author by
Aitazaz Khan
Updated on September 18, 2022Comments
-
Aitazaz Khan over 1 year
I am using xampp Apache server but it works locally i want to access it from public ip and i know the whole process but i am stuck how to change the port for Apache server because i dont want to access it with port 80 but is it possible that apache will run on other port please help and also how to change the port of mysql
-
Braiam over 10 yearsPlease, read the question marked as duplicated of this. It clearly says how to change the default port. For Mysql, you should ask another question.
-
Aitazaz Khan over 10 yearsif i have problem thats why i am asking its not clear you are insisting to me to remove this question why
-
Alaa Ali over 10 years@AitazazKhan we limit each post to one question. You have two different questions, Apache and MySQL. The Apache issue is solved (look at the duplicate question). For your MySQL question, please ask another question, just like you asked the Apache question. This is because these are two different problems, with two different solutions. Thanks.
-
Aitazaz Khan over 10 yearsif it is getting solved here and new newcomers are taking part with new idea what is the problem with you people although knowledge is a ocean don't underestimate any one.
-
-
Private over 10 yearswhy don't put that in /etc/apache2/ports.conf ?
-
mx7 over 10 years@Private my friend , I am saying that only right ? I am familiar with this type of modification.
-
Private over 10 yearsi know. i am new, thats why i ask. if it's the same then it's fine. thx
-
gihanchanuka over 9 yearsUsing above configuration, apache will listen on 80 and 8000 ports. In order to set 8000 as default port, change it in /etc/apache2/ports.conf file.