Find the answer to your Linux question:
Page 1 of 4 1 2 3 4 LastLast
Results 1 to 10 of 39
Ok im new im lost but im determined so here goes, im running mandrake 9.1 and im trying to get my apache webserver up. ok i have my ports open ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2003
    Posts
    67

    Apache Blues..


    Ok im new im lost but im determined so here goes, im running mandrake 9.1 and im trying to get my apache webserver up. ok i have my ports open in my router 80 and 8000 and 8080 . and if i do localhost/index.html i can see my page. but if i go to another computer and type in my IP /index.html it wont work. how exactly do i change the ports to 8080 on the config file its apache 2.0.whatever mandrake 9.1 uses i opened up the basic config file but i didnt see port on there. i also heard there are other configs that i need to modify??
    whew headache..

  2. #2
    Just Joined!
    Join Date
    Mar 2003
    Location
    UK
    Posts
    82
    Not entireley sure why other computers would not be connecting to the server on port 80. try port scanning to make sure the port actualy is open. If it is, then re-check your router config to make sure the ports you want are forwarded to the internal address of the machine running apache. if all seems well up to there, then you could have to change the settings of a firewall that could be running on your mandrake machine (I think it comes with a firewall pre-installed, It will have asked you what security level you want when you installed it)

    I think this should work for apache, I know it worked to get an ssh server running on a different port.

    find httpd.conf (usualy in /etc/apache)

    and find the section that says
    Code:
    #
    # Port: The port to which the standalone server listens. For
    # ports < 1023, you will need httpd to be run as root initially.
    #
    Port 80
    and change it to (assumuig you want to use port 8080)

    Code:
    #
    # Port&#58; The port to which the standalone server listens. For
    # ports < 1023, you will need httpd to be run as root initially.
    #
    Port 8080
    open up /etc/services

    and find the section that looks like this:

    Code:
    http             80/tcp    www www-http         #World Wide Web HTTP
    http             80/udp    www www-http         #World Wide Web HTTP
    you need to change it to
    Code:
    http             8080/tcp    www www-http         #World Wide Web HTTP
    http             8080/udp    www www-http         #World Wide Web HTTP
    if the server is currently running (you can use 'ps ax' to get a list of proccesses, check for httpd), run 'killall httpd' and then afterward run httpd to restart apache. If the server isn't running (if httpd isn't listen when you run 'ps ax') then just run httpd.

    That SHOULD work. if it doesn't then i'd be more than happy to grab the same version of apache as you and try to get it running on a different port.

    I apologize if I have been to specific in certain areas, I don't mean to be patronising, just thought it would be handy if any complete n00b could follow along aswell

    good luck

  3. #3
    Just Joined!
    Join Date
    May 2003
    Posts
    67
    see heres my dilema i dont have that i have httpd2 and its in /etc/httpd then i have 4 folders inside that 2.0 (which has httpd2.conf) conf (which also has that same file), the third folder is conf.d, and the last is logs


    i dont understand why i have 3 copies of the same exact file.


    heres a paste of part of the conf file this is also the only part that even talks about ports and im pretty sure this isnt the right place..?

    ### Main Configuration Section
    ### You really shouldn't change these settings unless you're a guru
    ###
    ServerRoot /etc/httpd/2.0
    #ServerName localhost
    #LockFile /etc/httpd/httpd.lock
    PidFile /var/run/httpd.pid
    ErrorLog logs/error_log
    LogLevel warn
    DocumentRoot /var/www/html


    ### Dynamic Shared Object (DSO) Support
    ###
    ### You should always leave those three, as they are needed for
    ### normal use.
    ### mod_access (Order, Allow, etc..)
    ### mod_log_config (Transferlog, etc..)
    ### mod_mime (AddType, etc...)

    LoadModule access_module modules/mod_access.so
    LoadModule auth_module modules/mod_auth.so
    LoadModule auth_anon_module modules/mod_auth_anon.so
    ##LoadModule auth_dbm_module modules/mod_auth_dbm.so
    LoadModule auth_digest_module modules/mod_auth_digest.so
    LoadModule include_module modules/mod_include.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule env_module modules/mod_env.so
    ##LoadModule mime_magic_module modules/mod_mime_magic.so
    ##LoadModule cern_meta_module modules/mod_cern_meta.so
    LoadModule expires_module modules/mod_expires.so
    LoadModule headers_module modules/mod_headers.so
    LoadModule usertrack_module modules/mod_usertrack.so
    ##LoadModule unique_id_module modules/mod_unique_id.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule proxy_module modules/mod_proxy.so
    ##LoadModule proxy_connect_module modules/mod_proxy_connect.so
    ##LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule status_module modules/mod_status.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule info_module modules/mod_info.so
    LoadModule cgi_module modules/mod_cgi.so
    ##LoadModule cgid_module modules/mod_cgid.so
    LoadModule vhost_alias_module modules/mod_vhost_alias.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule imap_module modules/mod_imap.so
    LoadModule actions_module modules/mod_actions.so
    ##LoadModule speling_module modules/mod_speling.so
    LoadModule userdir_module modules/mod_userdir.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule rewrite_module modules/mod_rewrite.so

    ##New Modules for 2.0 (some are experimental)
    ##LoadModule file_cache_module modules/mod_file_cache.so
    ##LoadModule echo_module modules/mod_echo.so
    ##LoadModule charset_lite_module modules/mod_charset_lite.so
    ##LoadModule cache_module modules/mod_cache.so
    ##LoadModule disk_cache_module modules/mod_disk_cache.so
    ##LoadModule mem_cache_module modules/mod_mem_cache.so
    ##LoadModule ext_filter_module modules/mod_ext_filter.so
    ##LoadModule case_filter_module modules/mod_case_filter.so
    ##LoadModule case_filter_in_module modules/mod_case_filter_in.so
    ##LoadModule deflate_module modules/mod_deflate.so
    ##LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
    ##LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
    ##LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
    ##LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
    ##LoadModule bucketeer_module modules/mod_bucketeer.so
    ##LoadModule logio_module modules/mod_logio.so

    ###
    ### Global Configuration
    ###
    # We now support multiple apache configurations on the same server. In
    # common.conf, we put all directives that are common to all implementations
    # (httpd, httpd-perl, etc.)
    # For Apache2 we load all conf files in conf.d
    Include /etc/httpd/conf.d/*.conf
    Include conf/commonhttpd.conf


    ###
    ### IP Address/Port and Proxied configuration section
    ###
    # The APACHEPROXIED setting can be set in /etc/rc.d/init.d/httpd if you
    # are using a proxy or accelerator, like the Apache-SGI or khttpd, so that
    # the fast web server serves static content while Apache handles the
    # cgi or php files

    #BindAddress *
    <IfDefine APACHEPROXIED>
    Listen 8080
    </IfDefine>
    <IfDefine !APACHEPROXIED>
    Listen 80
    </IfDefine>

    # Likewise, we can set apache as the server by default and send perl
    # requests via ProxyPass to apache-mod_perl. It increases performance
    # since the perl interpreter is only used for perl and the standard apache
    # does all the html and image files, with a smaller footprint.
    #
    # If you install apache and apache-mod_perl, this is the default config.
    # If you don't want two web servers to use perl, uninstall apache, and
    # apache-mod_perl will not be proxied.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2003
    Location
    UK
    Posts
    82
    right. I'll dig out a copy of 2.* tommorow and see if I can find a way to do it for ya. promise

  6. #5
    Just Joined!
    Join Date
    May 2003
    Posts
    67
    your a good man and all your help is very appreciated, cheers mate!

  7. #6
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284

    Re: Apache Blues..

    Quote Originally Posted by CyberFed
    Ok im new im lost but im determined so here goes, im running mandrake 9.1 and im trying to get my apache webserver up. ok i have my ports open in my router 80 and 8000 and 8080 . and if i do localhost/index.html i can see my page. but if i go to another computer and type in my IP /index.html it wont work.
    do you have a firewall on the local machine that is in anyway blocking port 80 from anything other than localhost? run "iptables -L" to check, feel free to paste up here if your not sure what your supposed to be looking for.

    Also, you said that you have tried to access from another machine? is that machine on the local network, or outsite, on the other side of the router?

    Some ISP's seem to think it is clever to block port 80

    Jason

  8. #7
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    Inaddition to the router and firewall issues something seems abit out of sink. Did you change some of the default file names or did it come that way?

    # For Apache2 we load all conf files in conf.d
    Include /etc/httpd/conf.d/*.conf
    Include conf/commonhttpd.conf
    You certainlly can change some of the names and locations but I would stick to the default install until you get the basic function of your web server using your router and firewall. I use 2.45 and just dont recognise the file names as the default. Like commonhttpd.conf versus httpd.conf.
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  9. #8
    Just Joined!
    Join Date
    May 2003
    Posts
    67
    i checked that common.conf file before and theres nothing in there about changing ports, i have a feeling 80 is blocked and i wanna set it to 8080. then im going to go to an outside machine and try it. but i dont know how to change the port.

  10. #9
    flw
    flw is offline
    Linux Engineer
    Join Date
    Mar 2003
    Location
    U.S.A.
    Posts
    1,025
    i checked that common.conf file before and theres nothing in there about changing ports, i have a feeling 80 is blocked and i wanna set it to 8080
    Thats because its in the httpd.conf file. If your not sure where it is try the following from the cmd line at the / (root) prompt, "find -name httpd.conf".
    Dan

    \"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"

  11. #10
    Just Joined!
    Join Date
    May 2003
    Posts
    67
    i only have an httpd2.conf and no where in there does it mention ports

Page 1 of 4 1 2 3 4 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •