Answer the question
In order to leave comments, you need to log in
How to open website access from outside on ubuntu server 14.04 with apache 2?
Hello, raised a web server on ubuntu-server 14.04.1 installed
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql imagemagick
sudo apt-get install mysql-server
sudo apt-get install phpmyadmin
Then I rebooted and configured pppoe with a static ip address. /var/www/html
I created a folder with my site /var/www/mysite.loc/public_html/
, filled in the site, created the necessary config in/etc/apache2/sites-available/mysite.loc.conf
<VirtualHost *:80>
ServerName myovis.loc
ServerAdmin [email protected]
Alias /myovis /var/www/myovis.loc/public_html
DocumentRoot /var/www/myovis.loc/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/myovis.loc/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel debug
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
I picked up the database, turned it on sudo a2ensite mysite.loc
and now I can access the site only if in Windows I register the host and domain in /windows/system32/drivers/etc/ hostsAnswer the question
In order to leave comments, you need to log in
Show the output of the commands:
ip a
netstat -ntpua | grep apache
iptables-save
/etc/apache2/sites-available/mysite.loc.conf does
sites-enable have the same config?
In order to have access to the site only by static ip ( http://192.168.0.1), you need to create a virtual host with the name 192.168.0.1.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question