Jump to content

[SOLVED] Help With Virtual Host


SLEDGEHAMMER84

Recommended Posts

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Sorry to keep side tracking you, but have you tried commenting out the line in /etc/hosts for mike-server then restarting your services?

 

You can have as many entries pointing to 127.0.0.1 within your /etc/hosts file. All it does is create another name to access your machine by.

Link to comment
Share on other sites

Sorry to keep side tracking you, but have you tried commenting out the line in /etc/hosts for mike-server then restarting your services?

 

You can have as many entries pointing to 127.0.0.1 within your /etc/hosts file. All it does is create another name to access your machine by.

I know that, but since it is not a fully qualified domain name, and not on the same line as localhost, wouldn't his system try to then assign it as a domain name and with the absence of a TLD extension fail? I admit that I may be wrong, but just trying to help.

Link to comment
Share on other sites

Sorry to keep side tracking you, but have you tried commenting out the line in /etc/hosts for mike-server then restarting your services?

@ neogranas: I will try this. And post results

 

@ thorpe: No i do not have any hardware or software firewall installations. Is there a way to test the throughput of a certain port. I am still able to access my server using www.mikesgreatgifts.com in PuTTY and VNC Viewer.

 

Here is the iptable

root@mike-server:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
root@mike-server:~#

 

 

Link to comment
Share on other sites

This is the commented hosts file...

127.0.0.1 localhost.localdomain localhost
#127.0.0.1 mike-server
127.0.0.1 www.mikesgreatgifts.com
127.0.0.1 www.mendezmartialarts.com



# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

 

And this is what i got in terminal. I went ahead and undid this since i got this error after doing this.

root@mike-server:~# /usr/sbin/apache2ctl configtest
apache2: apr_sockaddr_info_get() failed for mike-server
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
root@mike-server:~# /etc/init.d/apache2 reload
* Reloading web server config apache2                                          root@mike-server:~#

Link to comment
Share on other sites

Ok the specified directory for the error logs was non-existant for www.mendezmartialarts.com. I created the directory and the two files error.log and access.log. but now i get this. What permission group should i set for apache to be able to write???

 tail -n 200 /var/log/apache2/error.log
(2)No such file or directory: apache2: could not open error log file /home/mike/www/www.mendezmartialarts.com/logs/error.log.
Unable to open logs
root@mike-server:~# /home/mike/www/www.mendezmartialarts.com/logs/error.log
-bash: /home/mike/www/www.mendezmartialarts.com/logs/error.log: Permission denied
root@mike-server:~#

Link to comment
Share on other sites

I did a port scan to check for open ports on my static ip from a remote location, and the only ports that showed open were 21 & 22. Is there a way to see if the ISP is now blocking this port??? what settings to I need to check to make sure these ports are being used by apache? Is there any other reason why I would get these results?

Link to comment
Share on other sites

only router is the one provided by the ISP. I had configured it to forward the WAN static ip to the machines static lan IP. I figure that it forwards all ports(considering that i had it working and i have not made any changes to the router.) Can i run anything on the server to see if i can send out through 80?

Link to comment
Share on other sites

Ok finally i have some good news. ;D I am back where i started. www.mikesgreatgifts.com resolves but my second site is showing my mikesgreatgifts.com site. I am able to hit the server via external connection, through the domain names. I had to Uninstal apache completely. then re-instal via synaptic package manager. and it fired right up with no config modifications yet.

 

Last time I incurred my problem when i ran a2ensite www.mendezmartialarts.com.

 

Right now i dont have any files in my sites-enabled directory. I am not sure how it is serving this page since this is my default file in  /etc/apache2/sites-available directory? instead of showing the default "IT WORKS!" i get my site???

 

NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
<Directory />
	Options FollowSymLinks
	AllowOverride None
</Directory>
<Directory /var/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride None
	Order allow,deny
	allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
	AllowOverride None
	Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.